diff --git a/tests/test_utils.py b/tests/test_utils.py index ec7982f..2de72aa 100644 --- a/tests/test_utils.py +++ b/tests/test_utils.py @@ -9,7 +9,7 @@ import pytz from model_mommy import mommy -from small_small_hr.models import Leave +from small_small_hr.models import Leave, StaffProfile from small_small_hr.utils import create_annual_leave, get_carry_over @@ -22,7 +22,8 @@ def test_get_carry_over(self): """ Test get_carry_over """ - user = mommy.make('auth.User', first_name='Bob', last_name='Ndoe') + user = mommy.make('auth.User', id=23) + StaffProfile.objects.all().delete() staffprofile = mommy.make('small_small_hr.StaffProfile', user=user) self.assertEqual( @@ -66,7 +67,8 @@ def test_create_annual_leave(self): """ Test create_annual_leave """ - user = mommy.make('auth.User', first_name='Bob', last_name='Ndoe') + user = mommy.make('auth.User', id=56) + StaffProfile.objects.all().delete() staffprofile = mommy.make('small_small_hr.StaffProfile', user=user) obj = create_annual_leave(staffprofile, 2016, Leave.REGULAR)