Changeset 3389960 in flexoentity for tests/test_json_file_backend.py


Ignore:
Timestamp:
02/27/26 13:47:23 (3 days ago)
Author:
Enrico Schwass <ennoausberlin@…>
Branches:
unify_backends
Children:
c1144fd
Parents:
54941b4
Message:

redesign of Identity and PersistanceBackends - this is a breaking change.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tests/test_json_file_backend.py

    r54941b4 r3389960  
    2222    dom2 = make_domain("PY_STRINGS")
    2323
    24     backend.save(dom1)
    25     backend.save(dom2)
     24    backend.save(dom1.to_dict())
     25    backend.save(dom2.to_dict())
    2626    backend.flush_to_file()
    2727
     
    2929    backend2 = JsonFileBackend(Domain, path)
    3030    backend2.load_from_file()
    31 
    32     loaded = backend2.load_all()
    33     ids = sorted(d.domain_id for d in loaded)
     31    loaded_dicts = backend2.load_all()
     32    domains = [Domain.from_dict(d) for d in loaded_dicts]
     33    ids = sorted(d.domain_id for d in domains)
    3434    assert ids == ["PY_ARITHM", "PY_STRINGS"]
Note: See TracChangeset for help on using the changeset viewer.