summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/media/test_oembed.py3
-rw-r--r--tests/push/test_push_rule_evaluator.py2
2 files changed, 5 insertions, 0 deletions
diff --git a/tests/media/test_oembed.py b/tests/media/test_oembed.py

index 29d4580697..b8265ff9ca 100644 --- a/tests/media/test_oembed.py +++ b/tests/media/test_oembed.py
@@ -20,6 +20,7 @@ # import json +from typing import Any from parameterized import parameterized @@ -52,6 +53,7 @@ class OEmbedTests(HomeserverTestCase): def test_version(self) -> None: """Accept versions that are similar to 1.0 as a string or int (or missing).""" + version: Any for version in ("1.0", 1.0, 1): result = self.parse_response({"version": version}) # An empty Open Graph response is an error, ensure the URL is included. @@ -69,6 +71,7 @@ class OEmbedTests(HomeserverTestCase): def test_cache_age(self) -> None: """Ensure a cache-age is parsed properly.""" + cache_age: Any # Correct-ish cache ages are allowed. for cache_age in ("1", 1.0, 1): result = self.parse_response({"cache_age": cache_age}) diff --git a/tests/push/test_push_rule_evaluator.py b/tests/push/test_push_rule_evaluator.py
index c1f8e18bd9..3898532acf 100644 --- a/tests/push/test_push_rule_evaluator.py +++ b/tests/push/test_push_rule_evaluator.py
@@ -454,6 +454,7 @@ class PushRuleEvaluatorTestCase(unittest.TestCase): {"value": False}, "incorrect values should not match", ) + value: Any for value in ("foobaz", 1, 1.1, None, [], {}): self._assert_not_matches( condition, @@ -494,6 +495,7 @@ class PushRuleEvaluatorTestCase(unittest.TestCase): {"value": None}, "exact value should match", ) + value: Any for value in ("foobaz", True, False, 1, 1.1, [], {}): self._assert_not_matches( condition,