Format Python backend sources
This commit is contained in:
1 parent
2d8f138215
commit
8bbaf3c70b
4 files changed
+36
-10
No files matched your search
@@ -123,7 +123,9 @@ class AccessSettingsTests(unittest.TestCase):
|
||||
|
||||
def test_internal_update_disables_login_and_uses_admin_identity(self) -> None:
|
||||
store = _FakeStore(login_required=True)
|
||||
client = TestClient(_build_app(store, _FakeClient(setup_required=False), internal_secret="secret"))
|
||||
client = TestClient(
|
||||
_build_app(store, _FakeClient(setup_required=False), internal_secret="secret")
|
||||
)
|
||||
|
||||
response = client.put(
|
||||
"/api/auth/access/internal",
|
||||
|
||||
@@ -5,7 +5,12 @@ from shared_backend.coreconfig import Info, Store
|
||||
|
||||
class StoreDefaultsTests(unittest.TestCase):
|
||||
def test_seeds_from_fallback(self):
|
||||
store = Store(Info(auth_guard_url="http://auth.example.com", carrier_node_url="http://carrier.example.com"))
|
||||
store = Store(
|
||||
Info(
|
||||
auth_guard_url="http://auth.example.com",
|
||||
carrier_node_url="http://carrier.example.com",
|
||||
)
|
||||
)
|
||||
info = store.get()
|
||||
self.assertEqual(info.auth_guard_url, "http://auth.example.com")
|
||||
self.assertEqual(info.carrier_node_url, "http://carrier.example.com")
|
||||
@@ -20,7 +25,12 @@ class StoreDefaultsTests(unittest.TestCase):
|
||||
|
||||
class StoreSetTests(unittest.TestCase):
|
||||
def test_partial_push_does_not_clobber_other_field(self):
|
||||
store = Store(Info(auth_guard_url="http://auth.example.com", carrier_node_url="http://carrier.example.com"))
|
||||
store = Store(
|
||||
Info(
|
||||
auth_guard_url="http://auth.example.com",
|
||||
carrier_node_url="http://carrier.example.com",
|
||||
)
|
||||
)
|
||||
store.set(Info(carrier_node_url="http://carrier2.example.com"))
|
||||
info = store.get()
|
||||
self.assertEqual(info.auth_guard_url, "http://auth.example.com")
|
||||
@@ -46,7 +56,9 @@ class StoreSetTests(unittest.TestCase):
|
||||
"carrierNodeUrls": ["http://carrier.example.com", "http://carrier2.example.com"],
|
||||
}
|
||||
info = Info.from_json(payload)
|
||||
self.assertEqual(info.carrier_node_urls, ["http://carrier.example.com", "http://carrier2.example.com"])
|
||||
self.assertEqual(
|
||||
info.carrier_node_urls, ["http://carrier.example.com", "http://carrier2.example.com"]
|
||||
)
|
||||
self.assertEqual(info.to_json()["carrierNodeUrl"], "http://carrier.example.com")
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user