Code Duplication    Length = 6-7 lines in 2 locations

tests/tests_history.py 2 locations

@@ 157-163 (lines=7) @@
154
        self.assertEqual(res[0].Value.Value, self.values[0])
155
156
    # only start return original order
157
    def test_history_var_read_all_with_start(self):
158
        now = datetime.utcnow()
159
        old = now - timedelta(days=6)
160
        res = self.var.read_raw_history(old, None, 0)
161
        self.assertEqual(len(res), 20)
162
        self.assertEqual(res[-1].Value.Value, self.values[-1])
163
        self.assertEqual(res[0].Value.Value, self.values[0])
164
165
    # only end return reversed order
166
    def test_history_var_read_all_with_end(self):
@@ 166-171 (lines=6) @@
163
        self.assertEqual(res[0].Value.Value, self.values[0])
164
165
    # only end return reversed order
166
    def test_history_var_read_all_with_end(self):
167
        end = datetime.utcnow() + timedelta(days=6)
168
        res = self.var.read_raw_history(None, end, 0)
169
        self.assertEqual(len(res), 20)
170
        self.assertEqual(res[-1].Value.Value, self.values[0])
171
        self.assertEqual(res[0].Value.Value, self.values[-1])
172
173
    # only end return reversed order
174
    def test_history_var_read_3_with_end(self):