a2e45b8fdde315b756691b4ae573ad55f55dc002,tests/components/test_recorder.py,TestRecorder,_add_test_states,#TestRecorder#,30

Before Change


                           "last_changed, last_updated, created,"
                           "utc_offset, event_id)"
                           "VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)",
                           ("test.recorder2", "sensor", state,
                            json.dumps(attributes), timestamp, timestamp,
                            timestamp, -18000, event_id + 1000))

    def _add_test_events(self):
        Add a few events for testing.

After Change


                timestamp = now
                state = "dontpurgeme"

            self.session.add(recorder.get_model("States")(
                entity_id="test.recorder2",
                domain="sensor",
                state=state,
                attributes=json.dumps(attributes),
                last_changed=timestamp,
                last_updated=timestamp,
                created=timestamp,
                event_id=event_id + 1000
            ))

        self.session.commit()

    def _add_test_events(self):
        Add a few events for testing.
        now = datetime.now()
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: home-assistant/home-assistant
Commit Name: a2e45b8fdde315b756691b4ae573ad55f55dc002
Time: 2016-07-02
Author: rhooper@toybox.ca
File Name: tests/components/test_recorder.py
Class Name: TestRecorder
Method Name: _add_test_states


Project Name: ANSSI-FR/SecuML
Commit Name: b2983c70694f3c516453257ac21ea2d819aae0b3
Time: 2018-07-26
Author: anael.bonneton@ssi.gouv.fr
File Name: SecuML/experiments/Data/Dataset.py
Class Name: Dataset
Method Name: loadGroundTruth


Project Name: ANSSI-FR/SecuML
Commit Name: b2983c70694f3c516453257ac21ea2d819aae0b3
Time: 2018-07-26
Author: anael.bonneton@ssi.gouv.fr
File Name: SecuML/experiments/Data/Dataset.py
Class Name: Dataset
Method Name: loadIdents