Ejemplo n.º 1
0
    def test_power_on_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_on(context["system_id"], context)

        self.assertThat(power_mock, MockCalledOnceWith("on", context))
Ejemplo n.º 2
0
    def test_power_on_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_on(context['system_id'], context)

        self.assertThat(
            power_mock, MockCalledOnceWith('on', context))