mirror of
https://git.selfprivacy.org/SelfPrivacy/selfprivacy-rest-api.git
synced 2025-02-03 14:46:37 +00:00
test(services): add a test that we actually write json
This commit is contained in:
parent
22f157b6ff
commit
834e8c0603
|
@ -542,3 +542,15 @@ def enabling_disabling_reads_json(dummy_service: DummyService):
|
||||||
with WriteUserData() as data:
|
with WriteUserData() as data:
|
||||||
data[dummy_service.get_id()]["enabled"] = True
|
data[dummy_service.get_id()]["enabled"] = True
|
||||||
assert dummy_service.is_enabled() is True
|
assert dummy_service.is_enabled() is True
|
||||||
|
|
||||||
|
|
||||||
|
def enabling_disabling_writes_json(dummy_service: DummyService):
|
||||||
|
dummy_service.disable()
|
||||||
|
with ReadUserData() as data:
|
||||||
|
assert data[dummy_service.get_id()]["enabled"] is False
|
||||||
|
dummy_service.enable()
|
||||||
|
with ReadUserData() as data:
|
||||||
|
assert data[dummy_service.get_id()]["enabled"] is True
|
||||||
|
dummy_service.disable()
|
||||||
|
with ReadUserData() as data:
|
||||||
|
assert data[dummy_service.get_id()]["enabled"] is False
|
||||||
|
|
Loading…
Reference in a new issue