Exemplo n.º 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)
Exemplo n.º 2
0
 def test_zero_leases(self):
     current_leases = Decimal(0)
     units = Decimal(2)
     self.assertEqual(valuation._calculate_occupancy(current_leases, units), 0)
Exemplo n.º 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)
Exemplo n.º 4
0
 def test_good(self):
     current_leases = Decimal(10)
     units = Decimal(5)
     self.assertEqual(valuation._calculate_occupancy(current_leases, units), Decimal(2))
Exemplo n.º 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)
Exemplo n.º 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)
Exemplo n.º 7
0
 def test_zero_leases(self):
     current_leases = Decimal(0)
     units = Decimal(2)
     self.assertEqual(valuation._calculate_occupancy(current_leases, units),
                      0)
Exemplo n.º 8
0
 def test_good(self):
     current_leases = Decimal(10)
     units = Decimal(5)
     self.assertEqual(valuation._calculate_occupancy(current_leases, units),
                      Decimal(2))