def test_BaseCommandController_create(): tv = None c1 = BaseCommandController.create() assert isinstance(c1, BaseCommandController) c2 = BaseCommandController.create() assert isinstance(c2, BaseCommandController) assert c1 is not c2
def test_BaseCommandController_options(): with replattr(BaseCommandController, "OPTIONS_CLASS", FakeOptions): ctl = BaseCommandController.create() #assert isinstance(ctl.opts, FakeOptions), ctl.opts eq_(type(ctl.opts).__name__, "FakeOptions_KVOProxy") assert ctl.opts is ctl.options() obj = object() ctl.setOptions_(obj) eq_(ctl.options(), obj)