commit c9be29c17dfa36cbccd10097702b1a21b451fec7 Author: Arturo Filastò art@fuffa.org Date: Fri Oct 17 15:52:29 2014 +0200
Change the payload of the filename prefix files.
Setting a time too close to epoch makes UTC time conversions not work. --- ooni/tests/test_utils.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/ooni/tests/test_utils.py b/ooni/tests/test_utils.py index 5056b75..829ba90 100644 --- a/ooni/tests/test_utils.py +++ b/ooni/tests/test_utils.py @@ -8,7 +8,7 @@ class TestUtils(unittest.TestCase): def setUp(self): self.test_details = { 'test_name': 'foo', - 'start_time': 1 + 'start_time': 441759600 } self.extension = 'ext' self.prefix = 'prefix' @@ -46,19 +46,19 @@ class TestUtils(unittest.TestCase):
def test_generate_filename(self): filename = generate_filename(self.test_details) - self.assertEqual(filename, 'foo-1970-01-01T000001Z') + self.assertEqual(filename, 'foo-1984-01-01T000000Z')
def test_generate_filename_with_extension(self): filename = generate_filename(self.test_details, extension=self.extension) - self.assertEqual(filename, 'foo-1970-01-01T000001Z.ext') + self.assertEqual(filename, 'foo-1984-01-01T000000Z.ext')
def test_generate_filename_with_prefix(self): filename = generate_filename(self.test_details, prefix=self.prefix) - self.assertEqual(filename, 'prefix-foo-1970-01-01T000001Z') + self.assertEqual(filename, 'prefix-foo-1984-01-01T000000Z')
def test_generate_filename_with_extension_and_prefix(self): filename = generate_filename(self.test_details, prefix=self.prefix, extension=self.extension) - self.assertEqual(filename, 'prefix-foo-1970-01-01T000001Z.ext') + self.assertEqual(filename, 'prefix-foo-1984-01-01T000000Z.ext')
def test_generate_filename_with_filename(self): filename = generate_filename(self.test_details, filename=self.filename)
tor-commits@lists.torproject.org