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

tracker: small cleanup

Reviewers: smcv, pwith

Differential Revision: https://phabricator.apertis.org/D392
parent ee17c3cf
No related branches found
No related tags found
No related merge requests found
......@@ -86,21 +86,22 @@ class TrackerTest(unittest.TestCase):
def tracker_update_tests(self):
# Create a new file and assert it gets indexed
with open(self.homedir + '/Documents/something.txt', 'w') as f:
filename = self.homedir + '/Documents/something.txt'
with open(filename, 'w') as f:
f.write('something')
self.indexer.wait(True)
self.assert_indexed('Documents/something.txt',
'?urn nie:plainTextContent "something"')
# Modify the file should re-index it
with open(self.homedir + '/Documents/something.txt', 'w') as f:
with open(filename, 'w') as f:
f.write('something else')
self.indexer.wait(True)
self.assert_indexed('Documents/something.txt',
'?urn nie:plainTextContent "something else"')
# Delete file and assert it's not indexed anymore
os.remove(self.homedir + '/Documents/something.txt')
os.remove(filename)
self.indexer.wait(False)
self.assert_not_indexed('Documents/something.txt')
......
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