commit c82f7daefe655188dc5e4831048be9f88ad199e4
Author: Arturo Filastò <art(a)fuffa.org>
Date: Thu Aug 7 17:03:04 2014 +0200
Make the filename generation unittests check for the correct filename
---
ooni/tests/test_utils.py | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/ooni/tests/test_utils.py b/ooni/tests/test_utils.py
index c17235a..5056b75 100644
--- a/ooni/tests/test_utils.py
+++ b/ooni/tests/test_utils.py
@@ -46,19 +46,19 @@ class TestUtils(unittest.TestCase):
def test_generate_filename(self):
filename = generate_filename(self.test_details)
- self.assertEqual(filename, 'foo-1')
+ self.assertEqual(filename, 'foo-1970-01-01T000001Z')
def test_generate_filename_with_extension(self):
filename = generate_filename(self.test_details, extension=self.extension)
- self.assertEqual(filename, 'foo-1.ext')
+ self.assertEqual(filename, 'foo-1970-01-01T000001Z.ext')
def test_generate_filename_with_prefix(self):
filename = generate_filename(self.test_details, prefix=self.prefix)
- self.assertEqual(filename, 'prefix-foo-1')
+ self.assertEqual(filename, 'prefix-foo-1970-01-01T000001Z')
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-1.ext')
+ self.assertEqual(filename, 'prefix-foo-1970-01-01T000001Z.ext')
def test_generate_filename_with_filename(self):
filename = generate_filename(self.test_details, filename=self.filename)