[tracker-miners/sam/test-fixes: 8/8] functional-tests: Update to differentiate different types of update
- From: Sam Thursfield <sthursfield src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker-miners/sam/test-fixes: 8/8] functional-tests: Update to differentiate different types of update
- Date: Sat, 2 May 2020 10:02:32 +0000 (UTC)
commit 0c28df973fc6b87f082f4d8ab874883672878423
Author: Sam Thursfield <sam afuera me uk>
Date: Sat May 2 00:49:48 2020 +0200
functional-tests: Update to differentiate different types of update
File moves result in the nie:isStoredAs property of the information
resource changing. File updates result in the information resource
being deleted and recreated. These are different events and now
they have different await...() helpers.
tests/functional-tests/fixtures.py | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
---
diff --git a/tests/functional-tests/fixtures.py b/tests/functional-tests/fixtures.py
index 97619b793..b48447e33 100644
--- a/tests/functional-tests/fixtures.py
+++ b/tests/functional-tests/fixtures.py
@@ -160,10 +160,10 @@ class TrackerMinerTest(ut.TestCase):
"""Wraps await_update() context manager."""
from_url = self.uri(from_path)
to_url = self.uri(to_path)
- return self.tracker.await_update(DOCUMENTS_GRAPH,
- resource_id,
- f'nie:isStoredAs <{from_url}>',
- f'nie:isStoredAs <{to_url}>')
+ return self.tracker.await_property_update(DOCUMENTS_GRAPH,
+ resource_id,
+ f'nie:isStoredAs <{from_url}>',
+ f'nie:isStoredAs <{to_url}>')
def await_photo_inserted(self, path):
url = self.uri(path)
@@ -198,10 +198,10 @@ class TrackerMinerFTSTest (TrackerMinerTest):
if path.exists():
old_text_escaped = Tracker.sparql_escape_string(path.read_text())
resource_id = self.tracker.get_content_resource_id(self.uri(self.testfile))
- with self.tracker.await_update(DOCUMENTS_GRAPH,
- resource_id,
- f'nie:plainTextContent "{old_text_escaped}"',
- f'nie:plainTextContent "{text_escaped}"'):
+ with self.tracker.await_content_update(DOCUMENTS_GRAPH,
+ resource_id,
+ f'nie:plainTextContent "{old_text_escaped}"',
+ f'nie:plainTextContent "{text_escaped}"'):
path.write_text(text)
else:
url = self.uri(self.testfile)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]