summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/frontend/consistencyerror/plugins/consistencybug.py3
-rw-r--r--tests/frontend/consistencyerror/plugins/consistencyerror.py3
-rw-r--r--tests/frontend/project/sources/fetch_source.py3
-rw-r--r--tests/sources/no-fetch-cached/plugins/sources/always_cached.py3
-rw-r--r--tests/sources/project_key_test/plugins/sources/key-test.py5
5 files changed, 16 insertions, 1 deletions
diff --git a/tests/frontend/consistencyerror/plugins/consistencybug.py b/tests/frontend/consistencyerror/plugins/consistencybug.py
index c442d883a..c4a3217ec 100644
--- a/tests/frontend/consistencyerror/plugins/consistencybug.py
+++ b/tests/frontend/consistencyerror/plugins/consistencybug.py
@@ -11,6 +11,9 @@ class ConsistencyBugSource(Source):
def get_unique_key(self):
return {}
+ def is_resolved(self):
+ return True
+
def get_consistency(self):
# Raise an unhandled exception (not a BstError)
diff --git a/tests/frontend/consistencyerror/plugins/consistencyerror.py b/tests/frontend/consistencyerror/plugins/consistencyerror.py
index 125baf39c..d7433e368 100644
--- a/tests/frontend/consistencyerror/plugins/consistencyerror.py
+++ b/tests/frontend/consistencyerror/plugins/consistencyerror.py
@@ -11,6 +11,9 @@ class ConsistencyErrorSource(Source):
def get_unique_key(self):
return {}
+ def is_resolved(self):
+ return True
+
def get_consistency(self):
# Raise an error unconditionally
diff --git a/tests/frontend/project/sources/fetch_source.py b/tests/frontend/project/sources/fetch_source.py
index 51bfe1049..d634adfa3 100644
--- a/tests/frontend/project/sources/fetch_source.py
+++ b/tests/frontend/project/sources/fetch_source.py
@@ -66,6 +66,9 @@ class FetchSource(Source):
def get_unique_key(self):
return {"urls": self.original_urls, "output_file": self.output_file}
+ def is_resolved(self):
+ return True
+
def get_consistency(self):
if not os.path.exists(self.output_file):
return Consistency.RESOLVED
diff --git a/tests/sources/no-fetch-cached/plugins/sources/always_cached.py b/tests/sources/no-fetch-cached/plugins/sources/always_cached.py
index 623ab19ab..5f05b592b 100644
--- a/tests/sources/no-fetch-cached/plugins/sources/always_cached.py
+++ b/tests/sources/no-fetch-cached/plugins/sources/always_cached.py
@@ -20,6 +20,9 @@ class AlwaysCachedSource(Source):
def get_unique_key(self):
return None
+ def is_resolved(self):
+ return True
+
def get_consistency(self):
return Consistency.CACHED
diff --git a/tests/sources/project_key_test/plugins/sources/key-test.py b/tests/sources/project_key_test/plugins/sources/key-test.py
index 428846a3e..30256929c 100644
--- a/tests/sources/project_key_test/plugins/sources/key-test.py
+++ b/tests/sources/project_key_test/plugins/sources/key-test.py
@@ -11,7 +11,10 @@ class KeyTest(Source):
pass
def configure(self, node):
- self.ref = node.get_bool("ref", False)
+ if node.get_scalar("ref", None).is_none():
+ self.ref = None
+ else:
+ self.ref = True
def get_unique_key(self):
assert self.ref