def test_that_repeating_elements_actually_are_replaced(self): _number = 47 sentence = s.get_sentence(_number) self.assertIsInstance(sentence, self.variable_types) keywords = ['#REPEAT', '#DEFINE_REPEAT'] sentence = s.get_sentence() for keyword in keywords: self.assertNotIn(keyword, sentence)
def test_that_no_hashed_keywords_remain_in_sentence(self): keywords = [ '#VERB', '#NOUN', '#ADJECTIVE', '#NAME', '#ADJECTIVE_MAYBE', '#AN', '#RANDOM', '#CAPITALISE', '#CAPALL' ] sentence = s.get_sentence() for keyword in keywords: self.assertNotIn(keyword, sentence)
def test_get_sentence_handles_it_when_we_submit_a_float(self): _number = 98.9 sentence = s.get_sentence(_number) print(sentence) self.assertIsInstance(sentence, self.variable_types)
def test_get_sentence_with_a_random_integer(self): limits = s.__get_table_limits() upper_sentence_limit = limits['max_sen'] sen_id = random.randint(1, upper_sentence_limit) sentence = s.get_sentence(sen_id) self.assertIsInstance(sentence, self.variable_types)
def test_get_sentence_returns_a_unicode_string_with_integer_lower_limit( self): lower_limit = 1 sentence = s.get_sentence(lower_limit) self.assertIsInstance(sentence, self.variable_types)
def test_get_sentence_returns_a_unicode_string_with_integer_upper_limit( self): limits = s.__get_table_limits() upper_limit = limits['max_sen'] sentence = s.get_sentence(upper_limit) self.assertIsInstance(sentence, self.variable_types)
def test_get_sentence_returns_a_unicode_string(self): sentence = s.get_sentence() self.assertIsInstance(sentence, self.variable_types)
def test_that_no_hashed_keywords_remain_in_sentence(self): keywords = ['#VERB', '#NOUN', '#ADJECTIVE', '#NAME', '#ADJECTIVE_MAYBE', '#AN', '#RANDOM', '#CAPITALISE', '#CAPALL'] sentence = s.get_sentence() for keyword in keywords: self.assertNotIn(keyword, sentence)
def test_get_sentence_returns_a_unicode_string_with_integer_lower_limit(self): lower_limit = 1 sentence = s.get_sentence(lower_limit) self.assertIsInstance(sentence, self.variable_types)
def test_get_sentence_returns_a_unicode_string_with_integer_upper_limit(self): limits = s.__get_table_limits() upper_limit = limits['max_sen'] sentence = s.get_sentence(upper_limit) self.assertIsInstance(sentence, self.variable_types)