def test_basic_values(self): ret = parsers.csv('a,b,c') self.assertEqual(ret, ['a', 'b', 'c'])
def test_single_value(self): ret = parsers.csv('a') self.assertEqual(ret, ['a'])
def test_calls_csv_module(self, mock_reader): value = 'a,b,c' ret = parsers.csv(value) mock_reader.assert_called_once_with((value,)) mock_reader.return_value.next.assert_called_once_with() self.assertEqual(mock_reader.return_value.next.return_value, ret)