Skip to content
Snippets Groups Projects
Commit 8ccdd455 authored by Xavier Claessens's avatar Xavier Claessens Committed by Sjoerd Simons
Browse files

tracker: move LONG_JPEG_NAME to common.py

Reviewers: smcv, pwith

Differential Revision: https://phabricator.apertis.org/D394
parent 575b939c
No related branches found
No related tags found
No related merge requests found
......@@ -20,9 +20,7 @@ from gi.repository import Grl
# import from parent directory
sys.path.insert(0, os.path.join(os.path.dirname(__file__), os.pardir))
from common import TrackerIndexer
# define this here to make lint happy with too long lines
long_jpeg_name = '320px-European_Common_Frog_Rana_temporaria.jpg'
from common import LONG_JPEG_NAME
class TrackerTest(unittest.TestCase):
......@@ -75,7 +73,7 @@ class TrackerTest(unittest.TestCase):
self.assert_indexed('Documents/lorem_spreadsheet.ods')
self.assert_indexed('Documents/lorem_text.txt')
self.assert_indexed('Documents/more_lorem_ipsum.odt')
self.assert_indexed('Pictures/' + long_jpeg_name)
self.assert_indexed('Pictures/' + LONG_JPEG_NAME)
self.assert_indexed('Pictures/collabora-logo-big.png')
self.assert_indexed('Music/Generic_Sounds.pls',
'?urn nfo:entryCounter 3')
......@@ -117,7 +115,7 @@ class TrackerTest(unittest.TestCase):
self.assert_has_thumbnail('Documents/lorem_presentation.odp')
self.assert_has_thumbnail('Documents/lorem_spreadsheet.ods')
self.assert_has_thumbnail('Documents/more_lorem_ipsum.odt')
self.assert_has_thumbnail('Pictures/' + long_jpeg_name)
self.assert_has_thumbnail('Pictures/' + LONG_JPEG_NAME)
self.assert_has_thumbnail('Pictures/collabora-logo-big.png')
self.assert_has_thumbnail('Videos/big_buck_bunny_smaller.ogv')
......@@ -157,7 +155,7 @@ class TrackerTest(unittest.TestCase):
self.assertEqual(media.get_artist(), 'Conrad Parker')
self.assertEqual(media.get_album(), 'GNOME Audio')
elif filename in ['Music/generic.wav',
'Pictures/' + long_jpeg_name,
'Pictures/' + LONG_JPEG_NAME,
'Pictures/collabora-logo-big.png',
'Videos/big_buck_bunny_smaller.ogv']:
title = filename.split('/')[1]
......
......@@ -17,6 +17,9 @@ from gi.repository import Tracker
MEDIADIR = '/usr/lib/apertis-tests/resources/media'
# define this here to make lint happy with too long lines
LONG_JPEG_NAME = '320px-European_Common_Frog_Rana_temporaria.jpg'
class TrackerIndexer():
def __init__(self):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment