Exemple #1
0
def test_raises_for_save():
    gate = BaseGateway()

    with pytest.raises(RepositoryException) as e:
        gate.save({})

    assert str(e.value) == 'save gateway not implemented yet'
Exemple #2
0
def test_raises_for_delete():
    gate = BaseGateway()

    with pytest.raises(RepositoryException) as e:
        gate.delete(oid='1234567890')

    assert str(e.value) == 'delete gateway not implemented yet'
Exemple #3
0
def test_raises_for_update():
    gate = BaseGateway()

    with pytest.raises(RepositoryException) as e:
        gate.update(oid='1234567890', raw_attributes={})

    assert str(e.value) == 'update gateway not implemented yet'
Exemple #4
0
def test_gateway_abs_has_methods_init_and_down():
    r = BaseGateway()

    assert ismethod(r.init)
    assert ismethod(r.down)
Exemple #5
0
def test_gateway_sort():
    gate = BaseGateway()
    res = gate.sort([], sort_by=[''])

    assert res == []
Exemple #6
0
def test_gateway_limit():
    gate = BaseGateway()
    res = gate.limit([], offset=1, limit=100)

    assert res == []
Exemple #7
0
def test_gateway_list_return_empty_list():
    gate = BaseGateway()
    res = gate.list()

    assert res == []