'Test that we set our status correctly after a submission.'

def test_submissions(self):

    attempt = self.create_and_submit()
    assert_equals(attempt.status, 'submitted')
    with patch('lms.djangoapps.verify_student.models.requests.post', new=mock_software_secure_post_error):
        attempt = self.create_and_submit()
        assert_equals(attempt.status, 'must_retry')
    with patch('lms.djangoapps.verify_student.models.requests.post', new=mock_software_secure_post_unavailable):
        with LogCapture('lms.djangoapps.verify_student.models') as logger:
            attempt = self.create_and_submit()
            assert_equals(attempt.status, 'must_retry')
            logger.check(('lms.djangoapps.verify_student.models', 'ERROR', ('Software    Secure    submission    failed    for    user    %s,    setting    status    to    must_retry' % attempt.user.username)))
