def test_bad_units(self): current_leases = Decimal(10) units = 'a flock of jellyfish' with self.assertRaises(AssertionError): valuation._calculate_occupancy(current_leases, units)
def test_zero_leases(self): current_leases = Decimal(0) units = Decimal(2) self.assertEqual(valuation._calculate_occupancy(current_leases, units), 0)
def test_bad_current_leases(self): current_leases = 'an ape' units = Decimal(2) with self.assertRaises(AssertionError): valuation._calculate_occupancy(current_leases, units)
def test_good(self): current_leases = Decimal(10) units = Decimal(5) self.assertEqual(valuation._calculate_occupancy(current_leases, units), Decimal(2))