Skip to content

Commit

Permalink
#135: Fix failing unit test
Browse files Browse the repository at this point in the history
- Unit test was failing due to null session data being entered to the database
  • Loading branch information
MRichards99 committed Aug 12, 2020
1 parent 662fc3c commit e662c48
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions test/test_helpers.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from unittest import TestCase

from sqlalchemy.exc import IntegrityError
from datetime import datetime, timedelta

from common.database_helpers import delete_row_by_id, insert_row_into_table, LimitFilter, DistinctFieldFilter, \
IncludeFilter, SkipFilter, WhereFilter, OrderFilter
Expand Down Expand Up @@ -46,6 +47,9 @@ def setUp(self):
self.bad_credentials_header = {"Authorization": "Bearer BadTest"}
session = SESSION()
session.ID = "Test"
session.EXPIREDATETIME = datetime.now() + timedelta(hours=1)
session.username = "Test User"

insert_row_into_table(SESSION, session)

def tearDown(self):
Expand Down

0 comments on commit e662c48

Please sign in to comment.