Esempio n. 1
0
def test_inspect():

    s = Service(name='foo', client=flexmock())

    s.client.should_receive('inspect').with_args('foo').ordered().and_return(defer.succeed({'foo': 'bar'}))

    assert s.is_inspected() is False

    r = yield s.inspect()
    assert r == {'foo': 'bar'}

    assert s.is_inspected() is True

    assert s._inspect_data == {'foo': 'bar'}
Esempio n. 2
0
def test_inspect():

    s = Service(name='foo', client=flexmock())

    s.client.should_receive('inspect').with_args('foo').ordered().and_return(
        defer.succeed({'foo': 'bar'}))

    assert s.is_inspected() is False

    r = yield s.inspect()
    assert r == {'foo': 'bar'}

    assert s.is_inspected() is True

    assert s._inspect_data == {'foo': 'bar'}
Esempio n. 3
0
def test_not_inspected():

    s = Service()
    assert s.is_inspected() is False
Esempio n. 4
0
def test_inspected():

    s = Service()
    s._inspected = True

    assert s.is_inspected() is True
Esempio n. 5
0
def test_is_inspected():

    s = Service()

    assert not s.is_inspected()
Esempio n. 6
0
def test_not_inspected():

    s = Service()
    assert s.is_inspected() is False
Esempio n. 7
0
def test_inspected():

    s = Service()
    s._inspected = True

    assert s.is_inspected() is True
Esempio n. 8
0
def test_is_inspected():

    s = Service()

    assert not s.is_inspected()