def test_generate_consonant_type(self): self.assertIsInstance(dungeonsanddragons.generate_consonant(), str)
def test_generate_consonant_is_consonant(self): consonants = [ 'b', 'c', 'd', 'f', 'g', 'h', 'j', 'k', 'l', 'm', 'n', 'p', 'q', 'r', 's', 't', 'v', 'w', 'x', 'y', 'z' ] self.assertIn(dungeonsanddragons.generate_consonant(), consonants)
def test_generate_consonant(self): my_consonant = dungeonsanddragons.generate_consonant() self.assertIn(my_consonant, ['b', 'c', 'd', 'f', 'g', 'h', 'j', 'k', 'l', 'm', 'n', 'p', 'q', 'r', 's', 't', 'v', 'w', 'x', 'y', 'z'])
def test_generate_consonant_length(self): self.assertEqual(len(dungeonsanddragons.generate_consonant()), 1)
def test_generate_consonant_string(self): self.assertEqual(type(generate_consonant()), str)
def test_generate_consonant_length(self): self.assertEqual(len(generate_consonant()), 1)
def test_generate_consonant(self): consonant_letters = 'bcdfghjklmnpqrstvwxyz' self.assertIn(dungeonsanddragons.generate_consonant(), consonant_letters)
def test_generate_consonant_is_consonant(self): for i in range(1000): self.assertTrue(generate_consonant() in "bcdfghjklmnpqrstvwxyz")
def test_generate_vowel_alpha(self): dnd_consonant = dungeonsanddragons.generate_consonant() self.assertTrue(dnd_consonant.isalpha())
def test_generate_vowel_random(self): random.seed(3) fixed = dungeonsanddragons.generate_consonant() self.assertEqual("k", fixed) random.seed()
def test_generate_consonant_type(self): self.assertEqual(type(dungeonsanddragons.generate_consonant()), str)
def test_is_a_consonant(self): consonants = 'bcdfghjklmnpqrstvwxz' self.assertTrue(generate_consonant() in consonants)
def test_return_one_consonant(self): self.assertTrue(len(generate_consonant()) == 1)
def test_generate_consonant_len(self): self.assertEqual(1, len(generate_consonant()))
def test_generate_consonant(self): self.assertTrue(generate_consonant() in consonants)