Esempio n. 1
0
 def test_get_csv_id(self):
     converter = CsvConverter(None)
     h = {'foo': 'bar', 'bar': 'foo'}
     self.assertEqual(converter.get_csv_id(h),
                      hashlib.md5("bar=foo\nfoo=bar\n").hexdigest())
Esempio n. 2
0
def test_get_csv_id():
    converter = CsvConverter(None)
    h = {"foo": "bar", "bar": "foo"}
    assert (converter.get_csv_id(h) == hashlib.md5(
        "bar=foo\nfoo=bar\n".encode("utf-8")).hexdigest())