def test_has_attr_fail_wrong_value(self): class Config(object): color = 'red' widget = Fake("widget").expects("configure")\ .with_args(arg.has_attr(color="green")) widget.configure(Config())
def test_has_attr_fail(self): class Config(object): color = 'red' widget = Fake("widget").expects("configure")\ .with_args(arg.has_attr(size=12)) widget.configure(Config())
def test_has_attr_ok(self): class Config(object): size = 12 color = 'red' weight = 'heavy' widget = Fake("widget").expects("configure")\ .with_args(arg.has_attr(size=12,color='red')) widget.configure(Config())