Rename __json__() to asdict()

This commit is contained in:
grossmj committed 2021-04-17 23:34:28 +09:30
1 parent 44074ff7c9
commit cefab8d362
89 files changed
+286 -282

No files matched your search

+2 -2
View File
@@ -112,7 +112,7 @@ async def test_variables():
async def test_json():
p = Project(project_id=str(uuid4()))
assert p.__json__() == {
assert p.asdict() == {
"name": p.name,
"project_id": p.id,
"variables": None
@@ -124,7 +124,7 @@ async def test_json_with_variables():
variables = [{"name": "VAR1", "value": "VAL1"}]
p = Project(project_id=str(uuid4()), variables=variables)
assert p.__json__() == {
assert p.asdict() == {
"name": p.name,
"project_id": p.id,
"variables": variables