Ejemplo n.º 1
0
def test_persistence_state():
    assert_string_subclass(wire.PERSISTENCE_STATE_NOT_PERSISTED,
                           'NOT_PERSISTED')
    assert_string_subclass(wire.PERSISTENCE_STATE_TO_BE_PERSISTED,
                           'TO_BE_PERSISTED')
    assert_string_subclass(wire.PERSISTENCE_STATE_PERSISTED, 'PERSISTED')
    assert_string_subclass(wire.PERSISTENCE_STATE_LOST, 'LOST')
Ejemplo n.º 2
0
def test_bits():
    assert_string_subclass(wire.BITS_NONE, 'NONE')
    assert_string_subclass(wire.BITS_EXECUTE, 'EXECUTE')
    assert_string_subclass(wire.BITS_WRITE, 'WRITE')
    assert_string_subclass(wire.BITS_WRITE_EXECUTE, 'WRITE_EXECUTE')
    assert_string_subclass(wire.BITS_READ, 'READ')
    assert_string_subclass(wire.BITS_READ_EXECUTE, 'READ_EXECUTE')
    assert_string_subclass(wire.BITS_READ_WRITE, 'READ_WRITE')
    assert_string_subclass(wire.BITS_ALL, 'ALL')
Ejemplo n.º 3
0
def test_write_type():
    assert_string_subclass(wire.WRITE_TYPE_MUST_CACHE, 'MUST_CACHE')
    assert_string_subclass(wire.WRITE_TYPE_CACHE_THROUGH, 'CACHE_THROUGH')
    assert_string_subclass(wire.WRITE_TYPE_THROUGH, 'THROUGH')
    assert_string_subclass(wire.WRITE_TYPE_ASYNC_THROUGH, 'ASYNC_THROUGH')
Ejemplo n.º 4
0
def test_ttl_action():
    assert_string_subclass(wire.TTL_ACTION_DELETE, 'DELETE')
    assert_string_subclass(wire.TTL_ACTION_FREE, 'FREE')
Ejemplo n.º 5
0
def test_read_type():
    assert_string_subclass(wire.READ_TYPE_NO_CACHE, 'NO_CACHE')
    assert_string_subclass(wire.READ_TYPE_CACHE, 'CACHE')
    assert_string_subclass(wire.READ_TYPE_CACHE_PROMOTE, 'CACHE_PROMOTE')
Ejemplo n.º 6
0
def test_load_metadata_type():
    assert_string_subclass(wire.LOAD_METADATA_TYPE_NEVER, 'Never')
    assert_string_subclass(wire.LOAD_METADATA_TYPE_ONCE, 'Once')
    assert_string_subclass(wire.LOAD_METADATA_TYPE_ALWAYS, 'Always')
Ejemplo n.º 7
0
def test_string():
    name = 'name'
    assert_string_subclass(String(name), name)