Skip to content

Commit

Permalink
adds test case
Browse files Browse the repository at this point in the history
  • Loading branch information
mekhlakapoor committed May 14, 2024
1 parent b9d36cc commit f040767
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tests/labtracks/test_response_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -277,18 +277,21 @@ def test_map_housing(self):
housing2 = Housing.model_construct(room_id="000")
housing3 = Housing.model_construct(cage_id="1234")
housing4 = Housing.model_construct(room_id="000", cage_id="1234")
housing5 = Housing.model_construct(room_id="123", cage_id="456")

subject_housing1 = self.rh._map_housing(
room_id="-99999999999", cage_id=None
)
subject_housing2 = self.rh._map_housing(room_id="000", cage_id=None)
subject_housing3 = self.rh._map_housing(room_id=None, cage_id="1234")
subject_housing4 = self.rh._map_housing(room_id="000", cage_id="1234")
subject_housing5 = self.rh._map_housing(room_id=123, cage_id=456)

self.assertIsNone(subject_housing1)
self.assertEqual(subject_housing2, housing2)
self.assertEqual(subject_housing3, housing3)
self.assertEqual(subject_housing4, housing4)
self.assertEqual(subject_housing5, housing5)


if __name__ == "__main__":
Expand Down

0 comments on commit f040767

Please sign in to comment.