def test_return_fuzz_when_divisible_by_5(self): expected = 'buzz' result = fz.get_fizzbuzz(self.example1) for key, result_i in enumerate(result): value = key + 1 if value % 5 == 0 and not value % 15 == 0: self.assertEqual(result_i, expected)
def test_1_to_15(self): self.assertEqual(get_fizzbuzz(self.multiples, min_range=1, max_range=15), ['1', '2', 'Fizz', '4', 'Buzz', 'Fizz', '7', '8', 'Fizz', 'Buzz', '11', 'Fizz', '13', '14', 'FizzBuzz'])
def test_1_when_1(self): self.assertEqual(get_fizzbuzz(self.multiples, 1), ['1'])
def test_FizzBuzz_when_15(self): self.assertEqual(get_fizzbuzz(self.multiples, 15), ['FizzBuzz'])
def test_Buzz_when_5(self): self.assertEqual(get_fizzbuzz(self.multiples, 5), ['Buzz'])
def test_4_when_4(self): self.assertEqual(get_fizzbuzz(self.multiples, 4), ['4'])
def test_Fizz_when_3(self): self.assertEqual(get_fizzbuzz(self.multiples, 3), ['Fizz'])
def test_2_when_2(self): self.assertEqual(get_fizzbuzz(self.multiples, 2), ['2'])