예제 #1
0
 def test_bad_units(self):
     current_leases = Decimal(10)
     units = 'a flock of jellyfish'
     with self.assertRaises(AssertionError):
         valuation._calculate_occupancy(current_leases, units)
예제 #2
0
 def test_zero_leases(self):
     current_leases = Decimal(0)
     units = Decimal(2)
     self.assertEqual(valuation._calculate_occupancy(current_leases, units), 0)
예제 #3
0
 def test_bad_current_leases(self):
     current_leases = 'an ape'
     units = Decimal(2)
     with self.assertRaises(AssertionError):
         valuation._calculate_occupancy(current_leases, units)
예제 #4
0
 def test_good(self):
     current_leases = Decimal(10)
     units = Decimal(5)
     self.assertEqual(valuation._calculate_occupancy(current_leases, units), Decimal(2))
예제 #5
0
 def test_bad_units(self):
     current_leases = Decimal(10)
     units = 'a flock of jellyfish'
     with self.assertRaises(AssertionError):
         valuation._calculate_occupancy(current_leases, units)
예제 #6
0
 def test_bad_current_leases(self):
     current_leases = 'an ape'
     units = Decimal(2)
     with self.assertRaises(AssertionError):
         valuation._calculate_occupancy(current_leases, units)
예제 #7
0
 def test_zero_leases(self):
     current_leases = Decimal(0)
     units = Decimal(2)
     self.assertEqual(valuation._calculate_occupancy(current_leases, units),
                      0)
예제 #8
0
 def test_good(self):
     current_leases = Decimal(10)
     units = Decimal(5)
     self.assertEqual(valuation._calculate_occupancy(current_leases, units),
                      Decimal(2))