Format Python backend sources

This commit is contained in:
Gabriel20xx committed 2026-09-18 13:11:49 +02:00
1 parent 2d8f138215
commit 8bbaf3c70b
4 files changed
+36 -10

No files matched your search

@@ -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")