test(python-backend): restore test typing fixes and formatting
A later vendored sync reverted the test typing fixes from 23bd5b2 and the line-length formatting from 50461c0, which fails the ty check in consumers that run `ty check --error-on-warning`. Restore them: - assert the narrowed upgraded/found values before use - suppress the intentional _FakeDatabase argument mismatches with `# ty: ignore[invalid-argument-type]` - reformat the long lines to the package's line-length of 100 Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
75c08beec6
commit
74942e55f9
4 files changed
+25
-14
No files matched your search
@@ -104,7 +104,12 @@ class InternalSecretTests(unittest.TestCase):
|
||||
class UrlValidationTests(unittest.TestCase):
|
||||
def test_rejects_urls_that_are_not_http_or_https_with_a_host(self):
|
||||
store = Store(Info(auth_guard_url="http://auth.example.com"))
|
||||
for bad in ["javascript:alert(1)", "auth.example.com", "ftp://carrier.example.com", "http://"]:
|
||||
for bad in [
|
||||
"javascript:alert(1)",
|
||||
"auth.example.com",
|
||||
"ftp://carrier.example.com",
|
||||
"http://",
|
||||
]:
|
||||
with self.subTest(url=bad), self.assertRaises(ValueError):
|
||||
store.set(Info(auth_guard_url=bad))
|
||||
with self.assertRaises(ValueError):
|
||||
|
||||
Reference in new issue
Block a user