Commit 47c77011 by Awais Jibran

removing flakyness in unit test

parent dfefb3a2
...@@ -202,7 +202,6 @@ class SubmissionTest(XBlockHandlerTestCase): ...@@ -202,7 +202,6 @@ class SubmissionTest(XBlockHandlerTestCase):
@scenario('data/file_upload_scenario.xml') @scenario('data/file_upload_scenario.xml')
def test_remove_all_uploaded_files(self, xblock): def test_remove_all_uploaded_files(self, xblock):
""" Test remove all user files """ """ Test remove all user files """
self.maxDiff = None
s3 = boto3.resource('s3') s3 = boto3.resource('s3')
s3.create_bucket(Bucket='mybucket') s3.create_bucket(Bucket='mybucket')
s3.Object('mybucket', 'submissions_attachments/test_student/test_course/' + xblock.scope_ids.usage_id).put( s3.Object('mybucket', 'submissions_attachments/test_student/test_course/' + xblock.scope_ids.usage_id).put(
...@@ -216,7 +215,7 @@ class SubmissionTest(XBlockHandlerTestCase): ...@@ -216,7 +215,7 @@ class SubmissionTest(XBlockHandlerTestCase):
download_url = api.get_download_url("test_student/test_course/" + xblock.scope_ids.usage_id) download_url = api.get_download_url("test_student/test_course/" + xblock.scope_ids.usage_id)
resp = self.request(xblock, 'download_url', json.dumps(dict()), response_format='json') resp = self.request(xblock, 'download_url', json.dumps(dict()), response_format='json')
self.assertTrue(resp['success']) self.assertTrue(resp['success'])
self.assertEqual(download_url, resp['url']) self.assertTrue(resp['url'].startswith(download_url))
resp = self.request(xblock, 'remove_all_uploaded_files', json.dumps(dict()), response_format='json') resp = self.request(xblock, 'remove_all_uploaded_files', json.dumps(dict()), response_format='json')
self.assertTrue(resp['success']) self.assertTrue(resp['success'])
......
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