test cleanup

This commit is contained in:
Peter Molnar 2018-12-03 10:29:15 +00:00
parent a57fac3b11
commit 068c79ab07
3 changed files with 24 additions and 5 deletions

View file

@ -22,7 +22,6 @@ site = {
categorydisplay = {
'article': 'flat',
'journal': 'flat',
'photo': 'gallery',
}
licence = {

View file

@ -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):

View file

@ -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"
}