Commit 90bb2090 authored by Mikaël Salson's avatar Mikaël Salson

Merge branch 'feature-s/3682-test-order' into 'dev'

Fix server unit test order

Closes #3682

See merge request !391
parents e948d000 dd6364d6
Pipeline #59278 passed with stages
in 6 minutes and 24 seconds
......@@ -111,7 +111,7 @@ class Sample_setController(unittest.TestCase):
"first_name" : "bab",
"last_name" : "bab",
"birth" : "2010-10-10",
"info" : "bab",
"info" : "bab #ALL ",
"id_label" : "bab",
"sample_set_id": pat.sample_set_id
}
......
......@@ -28,14 +28,19 @@ class SamplesetsModel(unittest.TestCase):
names = samples.get_names()
self.assertEquals(names[fake_sample_set_id], "plo")
self.assertEquals(names[permission_sample_set], "bar")
self.assertTrue(names[fake_sample_set_id].startswith("bab"))
self.assertTrue(names[permission_sample_set].startswith("bar"))
def testGetTagNames(self):
samples = SampleSets([fake_sample_set_id, permission_sample_set])
names = samples.get_tag_names()
self.assertEquals('first_fake_tag' in names[fake_sample_set_id], True)
self.assertEquals('sec_fake_tag' in names[fake_sample_set_id], True)
self.assertEquals(permission_sample_set in names, False)
self.assertEquals(len(names), 1)
# Tags should have been removed by editing the entry in
# testEditForm()
self.assertFalse('first_fake_tag' in names[fake_sample_set_id])
self.assertFalse('sec_fake_tag' in names[fake_sample_set_id])
# But we should have a ref to the ALL tag
self.assertTrue('ALL' in names[fake_sample_set_id])
......@@ -316,7 +316,7 @@ doc_test_files = glob.glob(path)
print(len(doc_test_files)," controller files with possible doctests found.")
# get all files with tests
test_files = glob.glob('applications/'+appname+'/tests/unit/*/*.py')
test_files = sorted(glob.glob('applications/'+appname+'/tests/unit/*/*.py'))
if not len(test_files):
raise Exception("No files found for app: " + sys.argv[2])
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment