def test_power_off_calls_power(self): _, _, _, _, context = self.make_context() context["power_control"] = factory.make_name("power_control") seamicro_power_driver = SeaMicroPowerDriver() power_mock = self.patch(seamicro_power_driver, "_power") seamicro_power_driver.power_off(context["system_id"], context) self.assertThat(power_mock, MockCalledOnceWith("off", context))
def test_power_off_calls_power(self): _, _, _, _, context = self.make_context() context['power_control'] = factory.make_name('power_control') seamicro_power_driver = SeaMicroPowerDriver() power_mock = self.patch(seamicro_power_driver, '_power') seamicro_power_driver.power_off(context['system_id'], context) self.assertThat( power_mock, MockCalledOnceWith('off', context))