def test_create_csv_from_topics_list(self): input = [] input.append([self.topic_tuple, TopicTupleFactory(word='word2', topic=self.topic)]) input.append([self.topic_tuple, TopicTupleFactory(word='word2', topic=self.topic)]) topics_list = create_topic_list(input) csv = create_csv_from_topics_list(topics_list) output = 'word : 4.0,word2 : 4.0\r\nword : 4.0,word2 : 4.0\r\n' self.assertEquals(csv.content, output)
def test_create_topic_list(self): input = [] input.append([ self.topic_tuple, TopicTupleFactory(word='word2', topic=self.topic) ]) out = create_topic_list(input) self.assertEquals(out, [['word : 4.0', 'word2 : 4.0']])
def test_create_csv_from_topics_list(self): input = [] input.append([ self.topic_tuple, TopicTupleFactory(word='word2', topic=self.topic) ]) input.append([ self.topic_tuple, TopicTupleFactory(word='word2', topic=self.topic) ]) topics_list = create_topic_list(input) csv = create_csv_from_topics_list(topics_list) output = 'word : 4.0,word2 : 4.0\r\nword : 4.0,word2 : 4.0\r\n' self.assertEquals(csv.content, output)
def test_create_topic_list(self): input = [] input.append([self.topic_tuple, TopicTupleFactory(word='word2', topic=self.topic)]) out = create_topic_list(input) self.assertEquals(out, [['word : 4.0', 'word2 : 4.0']])