Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
tdt4242-base
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
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
Håvard Farestveit
tdt4242-base
Commits
1cfd8b42
Commit
1cfd8b42
authored
4 years ago
by
Håvard Farestveit
Browse files
Options
Downloads
Patches
Plain Diff
#36
Added docstring to 2-way domain test
parent
03e2456c
No related branches found
No related tags found
No related merge requests found
Pipeline
#126658
passed
4 years ago
Stage: test
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
backend/secfit/users/tests/user_registration.py
+4
-0
4 additions, 0 deletions
backend/secfit/users/tests/user_registration.py
with
4 additions
and
0 deletions
backend/secfit/users/tests/user_registration.py
+
4
−
0
View file @
1cfd8b42
...
...
@@ -10,6 +10,9 @@ class UserRegistration2WayTestCase(TestCase):
self
.
client
=
Client
()
def
test_two_way
(
self
):
"""
Performing 2-way domain test
"""
for
testcase
in
test_cases
:
request
=
{}
invalid_request
=
False
...
...
@@ -24,6 +27,7 @@ class UserRegistration2WayTestCase(TestCase):
elif
key
==
(
'
username
'
or
'
password
'
or
'
password1
'
)
and
value
==
'
blank
'
:
invalid_request
=
True
# Checking if the repsonse should return status code 400 or 201
response_code
=
400
if
invalid_request
else
201
response
=
self
.
client
.
post
(
'
/api/users/
'
,
request
)
self
.
assertEqual
(
response
.
status_code
,
response_code
)
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