Beispiel #1
0
def test_fits_header_entry_inverted():
    attr = ~db_attrs.FitsHeaderEntry('key', 'value')
    expected = '{"FitsHeaderEntry": ["key", "value", true]}'
    assert json.dumps(attr, cls=QueryEncoder) == expected
Beispiel #2
0
def test_decode_fits_header_entry():
    dump = '{"FitsHeaderEntry": ["key", "value", false]}'
    expected = db_attrs.FitsHeaderEntry('key', 'value')
    assert json.loads(dump, object_hook=query_decode) == expected