Move attempt.refresh_from_database call to the tests.
This commit is contained in:
@@ -39,7 +39,6 @@ class TestVerifyStudentCommand(MockS3BotoMixin, TestVerificationBase):
|
||||
self.create_upload_and_submit_attempt_for_user()
|
||||
with patch('lms.djangoapps.verify_student.models.requests.post', new=mock_software_secure_post_error):
|
||||
self.create_upload_and_submit_attempt_for_user()
|
||||
with patch('lms.djangoapps.verify_student.models.requests.post', new=mock_software_secure_post_error):
|
||||
self.create_upload_and_submit_attempt_for_user()
|
||||
|
||||
# check to make sure we had two successes and two failures; otherwise we've got problems elsewhere
|
||||
|
||||
@@ -62,6 +62,7 @@ class TestVerificationBase(TestCase):
|
||||
def submit_attempt(self, attempt):
|
||||
with self.immediate_on_commit():
|
||||
attempt.submit()
|
||||
attempt.refresh_from_db()
|
||||
return attempt
|
||||
|
||||
def create_and_submit_attempt_for_user(self, user=None):
|
||||
|
||||
Reference in New Issue
Block a user