def test_generate_vowel_if_output_in_original_list(self):
        """Test generate_vowel function if the output is in the original list.

        The result is expected True
        """
        vowels = ['a', 'e', 'i', 'o', 'u', 'y']
        self.assertTrue(dungeonsanddragons.generate_vowel() in vowels)
Esempio n. 2
0
 def test_generate_vowel2(self):
     self.assertEqual(1, len(dungeonsanddragons.generate_vowel()))   # Tests that the length of output is 2
Esempio n. 3
0
 def test_generate_vowel(self):
     self.assertEqual(str, type(dungeonsanddragons.generate_vowel()))   # Tests that output is of type string
Esempio n. 4
0
 def test_generate_vowel3(self):
     random.seed(2)
     self.assertEqual('A', dungeonsanddragons.generate_vowel())  # Tests fixed random output
     random.seed()
Esempio n. 5
0
 def test_generate_vowel(self):
     vowel = ['a', 'e', 'i', 'o', 'u', 'y']
     actual_value = generate_vowel()
     self.assertTrue(actual_value in vowel)
    def test_generate_vowel_length(self):
        """Test generate_vowel function if the length of output is 1.

        The result is expected 1
        """
        self.assertEqual(len(dungeonsanddragons.generate_vowel()), 1)
    def test_generate_vowel_type(self):
        """Test generate_vowel function if type of output is string.

        The result is expected True
        """
        self.assertTrue(type(dungeonsanddragons.generate_vowel()) == str)
 def test_generate_vowel_min(self, mock_randint):
     actual = generate_vowel()
     expected = 'a'
     self.assertEqual(expected, actual)