Skip to content
Snippets Groups Projects
Commit 1248a778 authored by Jeremy M Fee's avatar Jeremy M Fee
Browse files

Fix IMFV283Parser test

parent aca61115
No related branches found
No related tags found
No related merge requests found
"""Tests for the IMFV283 Parser class.""" """Tests for the IMFV283 Parser class."""
from __future__ import unicode_literals
from builtins import str
from nose.tools import assert_equals from nose.tools import assert_equals
from obspy import UTCDateTime from obspy import UTCDateTime
...@@ -6,15 +8,15 @@ from obspy import UTCDateTime ...@@ -6,15 +8,15 @@ from obspy import UTCDateTime
from geomagio.imfv283 import IMFV283Parser, imfv283_codes from geomagio.imfv283 import IMFV283Parser, imfv283_codes
IMFV283_EXAMPLE_VIC = '75C2A3A814023012741G43-1NN027EUP00191`A^P@RVxZ}|' + \ IMFV283_EXAMPLE_VIC = b'75C2A3A814023012741G43-1NN027EUP00191`A^P@RVxZ}|' + \
'D@@B_BEM@@@@@@@@@@@@@@@@@@@@@@@@@@@E|BxtTADVD@\\E\\BxxT@tVCh\\E' + \ b'D@@B_BEM@@@@@@@@@@@@@@@@@@@@@@@@@@@E|BxtTADVD@\\E\\BxxT@tVCh\\E' + \
'lByDT@xVCp\\EdBy@T@tVCh\\EhByPT@xVCl\\EPBy@T@tVCd\\EdBxlTA@VCp\\Eh' + \ b'lByDT@xVCp\\EdBy@T@tVCh\\EhByPT@xVCl\\EPBy@T@tVCd\\EdBxlTA@VCp\\Eh' + \
'BxTTA@VCp\\EdBGxTA@VCl\\EPBG`T@xVC\\\\DtBGHT@lVCD\\DPBG@T@XVBh\\' b'BxTTA@VCp\\EdBGxTA@VCl\\EPBG`T@xVC\\\\DtBGHT@lVCD\\DPBG@T@XVBh\\'
IMFV283_EXAMPLE_FRD = '75C2102614023012927G43-0NN027EUP00191bx@WyhD{' + \ IMFV283_EXAMPLE_FRD = b'75C2102614023012927G43-0NN027EUP00191bx@WyhD{' + \
'aDB~@X@{Bb@@@@@@@@@@@@@@@@@@@@@@@@@@@@[DAV[@cUAjT@[EAVZ@cUAjT@[' + \ b'aDB~@X@{Bb@@@@@@@@@@@@@@@@@@@@@@@@@@@@[DAV[@cUAjT@[EAVZ@cUAjT@[' + \
'BAVZ@cVAjS@[DAVZ@cUAjS@[DAVZ@cUAjS@[GAV\\@cTAjT@[DAV[@cUAjT@[BAVY' + \ b'BAVZ@cVAjS@[DAVZ@cUAjS@[DAVZ@cUAjS@[GAV\\@cTAjT@[DAV[@cUAjT@[BAVY' + \
'@cVAjT@[CAVW@cWAjT@[CAVT@cWAjU@[AAVO@cYAjV@Z}AVK@c[AjV' b'@cVAjT@[CAVW@cWAjT@[CAVT@cWAjU@[AAVO@cYAjV@Z}AVK@c[AjV'
def test_parse_msg_header(): def test_parse_msg_header():
...@@ -44,7 +46,7 @@ def test_estimate_data_time__correct_doy(): ...@@ -44,7 +46,7 @@ def test_estimate_data_time__correct_doy():
""" """
parser = IMFV283Parser() parser = IMFV283Parser()
# BOU aka normal # BOU aka normal
transmission = '17274013121' transmission = b'17274013121'
day = 274 day = 274
minute = 72 minute = 72
(data_time, transmit_time, corrected) = \ (data_time, transmit_time, corrected) = \
...@@ -61,7 +63,7 @@ def test_estimate_data_time__incorrect_doy(): ...@@ -61,7 +63,7 @@ def test_estimate_data_time__incorrect_doy():
""" """
parser = IMFV283Parser() parser = IMFV283Parser()
# BLC aka 1999 rollover gps issue # BLC aka 1999 rollover gps issue
transmission = '17274013241' transmission = b'17274013241'
day = 46 day = 46
minute = 78 minute = 78
(data_time, transmit_time, corrected) = \ (data_time, transmit_time, corrected) = \
......
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