Skip to content

Commit

Permalink
Fixed foi tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mghosh00 committed Mar 6, 2024
1 parent 334dc66 commit 05628e8
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,11 @@ def test_household_susc_waning(self):

# use pre-infection
self.infectee.increment_num_times_infected()
self.infectee.infection_start_time = self.time
self.infectee.infection_start_times = [self.time]
result = HouseholdInfection.household_susc(
self.infector, self.infectee, self.time)
self.assertEqual(result, 0.0)
pe.Parameters.instance().use_waning_immunity = 0.0

def test_house_inf_force(self):
result = HouseholdInfection.household_foi(self.infector,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,11 @@ def test_place_susc_waning(self):

# use pre-infection
self.infectee.increment_num_times_infected()
self.infectee.infection_start_time = self.time
self.infectee.infection_start_times = [self.time]
result = PlaceInfection.place_susc(self.place,
self.infectee, self.time)
self.assertEqual(result, 0.0)
pe.Parameters.instance().use_waning_immunity = 0.0

def test_place_inf(self):
result = PlaceInfection.place_inf(self.place, self.infector, self.time)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,11 @@ def test_spatial_susc_waning(self):

# use pre-infection
self.infectee.increment_num_times_infected()
self.infectee.infection_start_time = self.time
self.infectee.infection_start_times = [self.time]
result = SpatialInfection.spatial_susc(
self.cell, self.infectee, self.time)
self.assertEqual(result, 0.0)
pe.Parameters.instance().use_waning_immunity = 0.0

@patch('pyEpiabm.core.Parameters.instance')
def test_spatial_susc_no_age(self, mock_params):
Expand Down

0 comments on commit 05628e8

Please sign in to comment.