Skip to content

Commit

Permalink
inc coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
fanglinfang committed May 31, 2019
1 parent f4e0a0b commit 0ce1f01
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions uw_hrp/tests/test_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,13 @@ def test_worker_position(self):
self.assertTrue(work_position.is_future_date)
self.assertTrue(work_position.is_active_position())

work_position = WorkerPosition(
data={"PositionStartDate": None,
"IsFutureDate": False,
"PositionEndDate": None,
"PositionFTEPercent": "0.00000"})
self.assertIsNotNone(work_position)

def test_worker(self):
worker = Worker(netid='none',
regid="10000000",
Expand Down Expand Up @@ -244,7 +251,7 @@ def test_worker(self):
"IsFutureDate": False,
"IsMedicalCenterPosition": False,
"IsOnLeaveFromPosition": False,
"IsPrimaryPosition": True,
"IsPrimaryPosition": False,
"JobProfileSummary": {
"Href": "/hrp/v2/jobProfile/10886.json",
"JobCategory": "Hourly and Other",
Expand All @@ -262,8 +269,8 @@ def test_worker(self):
},
"PositionBusinessTitle": "Reader/Grader",
"PositionEffectiveDate": "2017-09-16T07:00:00.000Z",
"PositionEndDate": "2018-06-15T00:00:00.000Z",
"PositionFTEPercent": "0.00000",
"PositionEndDate": None,
"PositionFTEPercent": "10.00000",
"PositionID": "PN-0086428",
"PositionStartDate": "2017-09-16T00:00:00.000Z",
"PositionSupervisor": {
Expand Down Expand Up @@ -302,5 +309,6 @@ def test_worker(self):
'org_name': 'Web and Social Media'},
'title': 'Web Support Specialist'})
self.assertIsNotNone(str(worker.primary_position))
self.assertEqual(len(worker.other_active_positions), 0)
self.assertEqual(len(worker.other_active_positions), 1)
self.assertIsNotNone(str(worker.employee_status))
self.assertIsNotNone(str(worker))

0 comments on commit 0ce1f01

Please sign in to comment.