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

Fix test names, add test for 3 character code

parent facc59ec
No related branches found
No related tags found
No related merge requests found
"""Tests for EdgeFactory.py""" """Tests for MiniSeedFactory.py"""
from obspy.core import Stream, Trace, UTCDateTime from obspy.core import Stream, Trace, UTCDateTime
from geomagio.edge import MiniSeedFactory from geomagio.edge import MiniSeedFactory
...@@ -6,7 +6,7 @@ from nose.tools import assert_equals ...@@ -6,7 +6,7 @@ from nose.tools import assert_equals
def test__get_edge_network(): def test__get_edge_network():
"""edge_test.EdgeFactory_test.test__get_edge_network() """edge_test.MiniSeedFactory_test.test__get_edge_network()
""" """
# _get_edge_network should always return NT for use by USGS geomag # _get_edge_network should always return NT for use by USGS geomag
assert_equals( assert_equals(
...@@ -15,7 +15,7 @@ def test__get_edge_network(): ...@@ -15,7 +15,7 @@ def test__get_edge_network():
def test__get_edge_station(): def test__get_edge_station():
"""edge_test.EdgeFactory_test.test__get_edge_station() """edge_test.MiniSeedFactory_test.test__get_edge_station()
""" """
# _get_edge_station will return the observatory code passed in. # _get_edge_station will return the observatory code passed in.
assert_equals( assert_equals(
...@@ -24,7 +24,7 @@ def test__get_edge_station(): ...@@ -24,7 +24,7 @@ def test__get_edge_station():
def test__get_edge_channel(): def test__get_edge_channel():
"""edge_test.EdgeFactory_test.test__get_edge_channel() """edge_test.MiniSeedFactory_test.test__get_edge_channel()
""" """
# Call private function _get_edge_channel, make certain # Call private function _get_edge_channel, make certain
# it gets back the appropriate 2 character code. # it gets back the appropriate 2 character code.
...@@ -36,6 +36,8 @@ def test__get_edge_channel(): ...@@ -36,6 +36,8 @@ def test__get_edge_channel():
'UFF') 'UFF')
assert_equals(MiniSeedFactory()._get_edge_channel('', 'H', '', 'minute'), assert_equals(MiniSeedFactory()._get_edge_channel('', 'H', '', 'minute'),
'UFH') 'UFH')
assert_equals(MiniSeedFactory()._get_edge_channel('', 'BEU', '', 'minute'),
'BEU')
assert_equals( assert_equals(
MiniSeedFactory()._get_edge_channel('', 'DIST', '', 'minute'), MiniSeedFactory()._get_edge_channel('', 'DIST', '', 'minute'),
'UX4') 'UX4')
...@@ -48,7 +50,7 @@ def test__get_edge_channel(): ...@@ -48,7 +50,7 @@ def test__get_edge_channel():
def test__get_edge_location(): def test__get_edge_location():
"""edge_test.EdgeFactory_test.test__get_edge_location() """edge_test.MiniSeedFactory_test.test__get_edge_location()
""" """
# Call _get_edge_location, make certain it returns the correct edge # Call _get_edge_location, make certain it returns the correct edge
# location code. # location code.
...@@ -61,7 +63,7 @@ def test__get_edge_location(): ...@@ -61,7 +63,7 @@ def test__get_edge_location():
def test__get_interval_code(): def test__get_interval_code():
"""edge_test.EdgeFactory_test.test__get_interval_code() """edge_test.MiniSeedFactory_test.test__get_interval_code()
""" """
assert_equals(MiniSeedFactory()._get_interval_code('day'), 'P') assert_equals(MiniSeedFactory()._get_interval_code('day'), 'P')
assert_equals(MiniSeedFactory()._get_interval_code('hour'), 'R') assert_equals(MiniSeedFactory()._get_interval_code('hour'), 'R')
...@@ -71,7 +73,7 @@ def test__get_interval_code(): ...@@ -71,7 +73,7 @@ def test__get_interval_code():
def test__set_metadata(): def test__set_metadata():
"""edge_test.EdgeFactory_test.test__set_metadata() """edge_test.MiniSeedFactory_test.test__set_metadata()
""" """
# Call _set_metadata with 2 traces, and make certain the stats get # Call _set_metadata with 2 traces, and make certain the stats get
# set for both traces. # set for both traces.
...@@ -85,7 +87,7 @@ def test__set_metadata(): ...@@ -85,7 +87,7 @@ def test__set_metadata():
# def test_get_timeseries(): # def test_get_timeseries():
def dont_get_timeseries(): def dont_get_timeseries():
"""edge_test.EdgeFactory_test.test_get_timeseries()""" """edge_test.MiniSeedFactory_test.test_get_timeseries()"""
# Call get_timeseries, and test stats for comfirmation that it came back. # Call get_timeseries, and test stats for comfirmation that it came back.
# TODO, need to pass in host and port from a config file, or manually # TODO, need to pass in host and port from a config file, or manually
# change for a single test. # change for a single test.
......
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