Пример #1
0
 def test_if_output_is_correct(self):
     self.assertEqual("eggs", prepare_meal(5))
     self.assertEqual("spam", prepare_meal(3))
     self.assertEqual("spam spam spam", prepare_meal(27))
     self.assertEqual("spam and eggs", prepare_meal(15))
     self.assertEqual("spam spam and eggs", prepare_meal(45))
     self.assertEqual("", prepare_meal(7))
 def test_if_number_is_not_equal_to_3_on_power_of_n_or_cant_be_divided_by_5(self):
     self.assertEqual("", prepare_meal(4))
 def test_if_number_can_be_divided_by_5(self):
     self.assertEqual("eggs", prepare_meal(25))
 def test_if_number_is_equal_to_3_on_power_of_n_and_can_be_divided_by_5(self):
     self.assertEqual("spam spam and eggs", prepare_meal(45))
 def test_eggs_only(self):
     self.assertEqual("eggs", prepare_meal(5))
 def test_if_number_is_equal_to_3_on_power_of_n(self):
     self.assertEqual("spam spam spam ", prepare_meal(27))
 def test_no_meal_for_you(self):
     self.assertEqual("", prepare_meal(28))
 def test_two_spams_plus_eggs(self):
     self.assertEqual("spam spam and eggs", prepare_meal(45))
 def test_one_spam(self):
     self.assertEqual("spam", prepare_meal(3))
 def test_two_spams(self):
     self.assertEqual("spam spam", prepare_meal(9))
 def test_one_spam(self):
     self.assertEqual("spam", prepare_meal(3))
 def test_eggs_only(self):
     self.assertEqual("eggs", prepare_meal(5))
 def test_two_spams_plus_eggs(self):
     self.assertEqual("spam spam and eggs", prepare_meal(45))
 def test_no_meal_for_you(self):
     self.assertEqual("", prepare_meal(28))
 def test_two_spams(self):
     self.assertEqual("spam spam", prepare_meal(9))