Пример #1
0
    def test_read_legacy_reads_inverter(self):
        # execution
        read_legacy(SAMPLE_USER, SAMPLE_PASSWORD, "", SAMPLE_INVERTER_METER_ID)

        # evaluation
        self.assert_get_last_reading_called(SAMPLE_INVERTER_METER_ID)
        self.assert_inverter_state_set()
Пример #2
0
    def test_read_legacy_reads_counter(self, monkeypatch):
        # execution
        read_legacy(SAMPLE_USER, SAMPLE_PASSWORD, SAMPLE_COUNTER_METER_ID, "")

        # evaluation
        self.assert_get_last_reading_called(SAMPLE_COUNTER_METER_ID)
        self.assert_counter_state_set()