Fakultas Ilmu Komputer UI
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
DIGIPUS
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
PMPL
Class Project
DIGIPUS
Commits
58ad8b81
Commit
58ad8b81
authored
5 years ago
by
ilestin.il
Browse files
Options
Downloads
Patches
Plain Diff
[RED] make initialization test for upload materi page
parent
49ef345c
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
app/tests.py
+40
-0
40 additions, 0 deletions
app/tests.py
with
40 additions
and
0 deletions
app/tests.py
+
40
−
0
View file @
58ad8b81
...
@@ -128,3 +128,43 @@ class TemplateLoaderTest(TestCase):
...
@@ -128,3 +128,43 @@ class TemplateLoaderTest(TestCase):
response
=
Client
().
get
(
url
)
response
=
Client
().
get
(
url
)
self
.
assertEqual
(
response
.
status_code
,
200
)
self
.
assertEqual
(
response
.
status_code
,
200
)
self
.
assertTemplateUsed
(
response
,
expected_template_name
)
self
.
assertTemplateUsed
(
response
,
expected_template_name
)
class
UploadPageTest
(
TestCase
):
def
test_upload_page_using_login_func
(
self
):
found
=
resolve
(
""
)
self
.
assertEqual
(
found
.
func
.
__name__
,
)
def
test_upload_page_url_is_exist
(
self
):
# Positive tests
response
=
Client
().
get
(
""
)
self
.
assertEqual
(
response
.
status_code
,
200
)
# Negative tests
response
=
Client
().
get
(
""
)
self
.
assertEqual
(
response
.
status_code
,
404
)
def
test_upload_page_template
(
self
):
url
=
""
response
=
Client
().
get
(
url
)
expected_template_name
=
""
self
.
assertTemplateUsed
(
response
,
expected_template_name
)
def
test_upload_page_title
(
self
):
response
=
Client
().
get
(
""
)
# Positive tests
self
.
assertContains
(
response
,
""
)
# Negative tests
self
.
assertNotContains
(
response
,
""
)
def
test_upload_page_form_field
(
self
):
response
=
Client
().
get
(
""
)
# Positive tests
self
.
assertContains
(
response
,
""
)
self
.
assertContains
(
response
,
""
)
# Negative tests
self
.
assertNotContains
(
response
,
""
)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment