If an assertion fails, the tests stop at that point, never reaching the last line in the test. You have to handle any tear down, in the tearDown method.
This commit is contained in:
parent
be9b613bbb
commit
73137d0858
|
@ -1,15 +1,20 @@
|
|||
import json
|
||||
from datetime import timezone, datetime
|
||||
from tests.base_test import BaseTest
|
||||
|
||||
from crc import db, app
|
||||
from crc.models.study import StudySchema
|
||||
from crc.models.user import UserModel
|
||||
from models.protocol_builder import ProtocolBuilderStatus
|
||||
from tests.base_test import BaseTest
|
||||
from crc.models.protocol_builder import ProtocolBuilderStatus
|
||||
|
||||
|
||||
class TestAuthentication(BaseTest):
|
||||
|
||||
def tearDown(self):
|
||||
# Assure we set the production flag back to false.
|
||||
app.config['PRODUCTION'] = False
|
||||
super().tearDown()
|
||||
|
||||
def test_auth_token(self):
|
||||
self.load_example_data()
|
||||
user = UserModel(uid="dhf8r")
|
||||
|
|
Loading…
Reference in New Issue