Skip to content
Snippets Groups Projects
Commit c8f18830 authored by Bruce Flynn's avatar Bruce Flynn
Browse files

Fix test for v2

parent cfe645d9
No related branches found
No related tags found
No related merge requests found
......@@ -31,15 +31,15 @@ class ParserV0Tests(unittest.TestCase):
self.assertEqual(record['stamp'], datetime(1970, 1, 1))
class ParserV1Tests(unittest.TestCase):
class ParserV1V2Tests(unittest.TestCase):
line = ("1,1970,1,0000,0,976.59,5.8564,30.085,25.893,977.36,58732,"
"47.375,24.234,23.865,22.615,37.219,6.9222,67.398,145.2,45.581,"
"22.669,10.417,145.2,22.665,163.94,0,0,30.015,29.89\n")
def _cut(self):
from aosstower.l00.parser import ParserV1
return ParserV1()
from aosstower.l00.parser import ParserV1V2
return ParserV1V2()
def test_maybe_mine(self):
parser = self._cut()
......@@ -56,3 +56,8 @@ class ParserV1Tests(unittest.TestCase):
self.assertIn('stamp', record)
self.assertEqual(record['stamp'], datetime(1970, 1, 1))
def test_record_supports_v1_and_v2(self):
parser = self._cut()
parser.parse(self.line)
parser.parse(self.line.strip() + ',999\n')
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment