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'}
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'}
def test_not_inspected(): s = Service() assert s.is_inspected() is False
def test_inspected(): s = Service() s._inspected = True assert s.is_inspected() is True
def test_is_inspected(): s = Service() assert not s.is_inspected()