mirror of
https://github.com/sartography/protocol-builder-mock.git
synced 2025-02-04 20:03:56 +00:00
Tests were failing because forms were not sending Q_COMPLETE data.
Added mocked Q_COMPLETE data to `add_study` and `test_add_and_edit_study`.
This commit is contained in:
parent
15dc53f957
commit
4e2b79741f
@ -57,6 +57,8 @@ class Sanity_Check_Test(unittest.TestCase):
|
|||||||
for r in form.requirements:
|
for r in form.requirements:
|
||||||
form.data['requirements'].append(r.data)
|
form.data['requirements'].append(r.data)
|
||||||
|
|
||||||
|
form.Q_COMPLETE.data = "('No Error', 'Passed validation.')"
|
||||||
|
|
||||||
r = self.app.post('/new_study', data=form.data, follow_redirects=False)
|
r = self.app.post('/new_study', data=form.data, follow_redirects=False)
|
||||||
assert r.status_code == 302
|
assert r.status_code == 302
|
||||||
added_study = Study.query.filter(Study.TITLE == study_title).first()
|
added_study = Study.query.filter(Study.TITLE == study_title).first()
|
||||||
@ -79,6 +81,7 @@ class Sanity_Check_Test(unittest.TestCase):
|
|||||||
|
|
||||||
for r in form_2.requirements:
|
for r in form_2.requirements:
|
||||||
form_2.data['requirements'].append(r.data)
|
form_2.data['requirements'].append(r.data)
|
||||||
|
form_2.Q_COMPLETE.data = "('No Error', 'Passed validation.')"
|
||||||
|
|
||||||
r_2 = self.app.post('/study/%i' % added_study.STUDYID, data=form_2.data, follow_redirects=False)
|
r_2 = self.app.post('/study/%i' % added_study.STUDYID, data=form_2.data, follow_redirects=False)
|
||||||
assert r_2.status_code == 302
|
assert r_2.status_code == 302
|
||||||
|
Loading…
x
Reference in New Issue
Block a user