Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
scheduling-system
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
External wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
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
SMASCH
scheduling-system
Commits
e1387ba7
Commit
e1387ba7
authored
7 years ago
by
Piotr Gawron
Browse files
Options
Downloads
Patches
Plain Diff
test for correct redirection when save and continue clicked on subject edit
parent
1c3248c4
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!100
Test coverage unit tests
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
smash/web/tests/view/test_subjects.py
+10
-0
10 additions, 0 deletions
smash/web/tests/view/test_subjects.py
with
10 additions
and
0 deletions
smash/web/tests/view/test_subjects.py
+
10
−
0
View file @
e1387ba7
...
...
@@ -67,6 +67,16 @@ class SubjectsViewTests(LoggedInWithWorkerTestCase):
self
.
assertTrue
(
updated_study_subject
.
subject
.
dead
)
self
.
assertTrue
(
updated_study_subject
.
resigned
)
def
test_save_subject_edit_with_continue
(
self
):
form_data
=
self
.
create_edit_form_data_for_study_subject
()
form_data
[
'
_continue
'
]
=
True
response
=
self
.
client
.
post
(
reverse
(
'
web.views.subject_edit
'
,
kwargs
=
{
'
id
'
:
self
.
study_subject
.
id
}),
data
=
form_data
)
self
.
assertEqual
(
response
.
status_code
,
302
)
self
.
assertTrue
(
"
edit
"
in
response
.
url
)
def
create_edit_form_data_for_study_subject
(
self
):
form_study_subject
=
StudySubjectEditForm
(
instance
=
self
.
study_subject
,
prefix
=
"
study_subject
"
)
form_subject
=
SubjectEditForm
(
instance
=
self
.
study_subject
.
subject
,
prefix
=
"
subject
"
)
...
...
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