Skip to content

Commit

Permalink
clean up (#17)
Browse files Browse the repository at this point in the history
more test coverage
  • Loading branch information
fanglinfang committed Dec 21, 2022
1 parent 54c9155 commit 4cdcc7f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 0 additions & 1 deletion uw_hrp/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,6 @@ def __init__(self, *args, **kwargs):

class WorkerDetails(models.Model):
worker_wid = models.CharField(max_length=32)
is_active = models.BooleanField(default=False)
primary_job_title = models.CharField(
max_length=128, null=True, default=None)
primary_manager_id = models.CharField(
Expand Down
5 changes: 5 additions & 0 deletions uw_hrp/tests/test_person.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,11 @@ def test_get_person_by_regid(self):
self.assertTrue(person.is_active)
self.assertEqual(person.primary_manager_id, "100000001")
self.assertEqual(len(person.worker_details), 1)
self.assertIsNotNone(person.to_json())
json_worker_details = person.to_json()['worker_details']
self.assertEqual(len(json_worker_details), 1)
self.assertEqual(
len(json_worker_details[0]['active_positions']), 2)
position = person.worker_details[0]
self.assertEqual(len(position.other_active_positions), 1)
self.maxDiff = None
Expand Down

0 comments on commit 4cdcc7f

Please sign in to comment.