<s> from odmtools . odmdata import * <EOL> from odmtools . odmdata import copy_series <EOL> from tests import test_util <EOL> class TestSeries : <EOL> def setup ( self ) : <EOL> self . connection_string = "<STR_LIT>" <EOL> session_factory = SessionFactory ( self . connection_string , echo = False ) <EOL> test_util . build_db ( session_factory . engine ) <EOL> self . session = session_factory . get_session ( ) <EOL> self . series = test_util . add_series ( self . session ) <EOL> def test_create_series ( self ) : <EOL> assert self . series != None <EOL> assert self . series . id != None <EOL> def test_data_values_relationship ( self ) : <EOL> assert self . series . data_values != None <EOL> assert len ( self . series . data_values ) != <NUM_LIT:0> <EOL> def test_site_relationship ( self ) : <EOL> site = self . series . site <EOL> assert site != None <EOL> def test_variable_relationship ( self ) : <EOL> var = self . series . variable <EOL> assert var != None <EOL> def test_method_relationship ( self ) : <EOL> method = self . series . method <EOL> assert method != None <EOL> def test_source_relationship ( self ) : <EOL> source = self . series . source <EOL> assert source != None <EOL> def test_qcl_relationship ( self ) : <EOL> qcl = self . series . quality_control_level <EOL> assert qcl != None <EOL> def test_get_table_cols ( self ) : <EOL> assert len ( self . series . get_table_columns ( ) ) == <NUM_LIT:30> <EOL> assert "<STR_LIT>" in self . series . get_table_columns ( ) <EOL> assert "<STR_LIT>" in self . series . get_table_columns ( ) <EOL> def test_list_repr ( self ) : <EOL> assert len ( self . series . list_repr ( ) ) == <NUM_LIT:30> <EOL> assert self . series . id == self . series . list_repr ( ) [ <NUM_LIT:0> ] <EOL> def test_copy_series ( self ) : <EOL> copy = copy_series ( self . series ) <EOL> assert copy . id != self . series . id <EOL> assert copy . site_id == self . series . site_id <EOL> assert copy . variable_id == self . series . variable_id <EOL> assert copy . method_id == self . series . method_id <EOL> assert copy . source_id == self . series . source_id <EOL> assert copy . quality_control_level_id == self . series . quality_control_level_id </s>
