diff --git a/settings.py b/settings.py index 56801d1..97fd15e 100644 --- a/settings.py +++ b/settings.py @@ -22,7 +22,6 @@ site = { categorydisplay = { 'article': 'flat', 'journal': 'flat', - 'photo': 'gallery', } licence = { diff --git a/tests.py b/tests.py index d657a64..d1de645 100644 --- a/tests.py +++ b/tests.py @@ -34,14 +34,34 @@ class TestSingular(unittest.TestCase): def test_singular_tags(self): self.assertEqual( self.singular.tags, - ['Llyn Idwal', 'winter', 'spring', 'cloudy', 'Snowdonia', 'mountain', 'clouds', 'lake', 'mountains', 'snow', 'Wales', 'water'] + [ + 'Llyn Idwal', + 'winter', + 'spring', + 'cloudy', + 'Snowdonia', + 'mountain', + 'clouds', + 'lake', + 'mountains', + 'snow', + 'Wales', + 'water' + ] ) class TestExiftool(unittest.TestCase): def test_exiftool(self): - with open('tests/.tests.jpg.json', 'rt') as expected: + if os.path.exists('tests/.Exif.tests.jpg.json'): + os.unlink('tests/.Exif.tests.jpg.json') + with open('tests/tests.jpg.json', 'rt') as expected: o = json.loads(expected.read()) self.assertEqual(exiftool.Exif('tests/tests.jpg'), o) + self.assertTrue(os.path.exists('tests/.Exif.tests.jpg.json')) + self.assertTrue( + os.path.getmtime('tests/.Exif.tests.jpg.json') > + os.path.getmtime('tests/tests.jpg.json') + ) class TestPandoc(unittest.TestCase): def test_pandoc(self): diff --git a/tests/.tests.jpg.json b/tests/tests.jpg.json similarity index 94% rename from tests/.tests.jpg.json rename to tests/tests.jpg.json index 292c8f8..93f065c 100644 --- a/tests/.tests.jpg.json +++ b/tests/tests.jpg.json @@ -8,7 +8,7 @@ "ExposureTime": "1/320", "FNumber": 11.0, "FOV": "67.4 deg", - "FileName": "llyn-idwal.jpg", + "FileName": "tests.jpg", "FileSize": 29123, "FileType": "JPEG", "FocalLength": "18.0 mm", @@ -25,5 +25,5 @@ "Model": "PENTAX K-5 II s", "ModifyDate": "2016-05-01T00:08:24+00:00", "ReleaseDate": "2016-07-23T09:00:23+00:00", - "SourceFile": "tests/llyn-idwal.jpg" + "SourceFile": "tests/tests.jpg" } \ No newline at end of file