Skip to content

Commit

Permalink
Fixing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
LanternNassi committed Jun 20, 2023
1 parent 80e2513 commit e176cc8
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion app/controllers/statuses.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

from imp import reload
import os
from time import clock_settime
# from time import clock_settime

import requests
from yaml import scan
Expand Down
2 changes: 1 addition & 1 deletion app/tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
@pytest.fixture(scope='function')
def new_user(test_client):
user = User(
email='test_email@testdomain.com', password='test_password', name='test_name')
email='test_email@testdomain.com', password='test_password', name='test_name' , organisation='Makerere')
user.verified=True
user.save()
return user
Expand Down
8 changes: 6 additions & 2 deletions app/tests/user/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,13 @@ class UserBaseTestCase():
'email': 'test_email@testdomain.com',
'name': 'Test User',
'password': 'Compl3xPassw0rd',
'organisation': 'Makerere',
'phone_number': '+256777777777'
}
user_data_2 = {
'email': 'test_email_2@testdomain.com',
'name': 'Test User 2',
'organisation': 'Makerere',
'password': 'Compl3xPassw0rd',
}
invalid_user_data = {
Expand All @@ -24,11 +26,13 @@ class UserBaseTestCase():
'email': 'test_admin@testdomain.com',
'name': 'Test Admin',
'password': 'Compl3xPassw0rd',
'phone_number': '+256777777777'
'phone_number': '+256777777777',
'organisation': 'Makerere',
}

def create_user(self, user_data):
user = User(email=user_data['email'],
user = User(email=user_data['email'],
organisation=user_data['organisation'],
password=user_data['password'],
name=user_data['name'])
user.verified=True
Expand Down

0 comments on commit e176cc8

Please sign in to comment.