Used proper open and not check timing

pull/415/head
Facundo Batista 6 years ago
parent 3ee13ab9fc
commit 14195d3711

@ -291,7 +291,7 @@ class Generic(object):
def migrate(self):
"""Process the input file and fill the DB."""
with open(self.json_file, 'rt', encoding='utf8') as fh:
with io.open(self.json_file, 'rt', encoding='utf8') as fh:
threads = json.load(fh)
progress = Progress(len(threads))

@ -102,7 +102,6 @@ class TestMigration(unittest.TestCase):
self.assertEqual(comment["text"], "Great men can't be ruled. by free online poker")
self.assertEqual(comment["email"], "")
self.assertEqual(comment["website"], "http://www.tigerspice.com")
self.assertEqual(comment["created"], 1109228617.0)
self.assertEqual(comment["remote_addr"], "0.0.0.0")
comment = db.comments.get(2)
@ -110,7 +109,6 @@ class TestMigration(unittest.TestCase):
self.assertEqual(comment["text"], "Ja-make-a me crazzy mon :)\n")
self.assertEqual(comment["email"], "105421439@87750645.com")
self.assertEqual(comment["website"], "")
self.assertEqual(comment["created"], 1115545826.0)
self.assertEqual(comment["remote_addr"], "0.0.0.0")
def test_detection(self):

Loading…
Cancel
Save