Skip to content

Commit

Permalink
Fix broken tests
Browse files Browse the repository at this point in the history
  • Loading branch information
moshthepitt committed Jun 19, 2018
1 parent ddad83e commit e9dc29e
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions tests/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand All @@ -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(
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit e9dc29e

Please sign in to comment.