<s> from odmtools . odmdata import * <EOL> from tests import test_util <EOL> class TestDataValue : <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> self . data_values = self . series . data_values <EOL> def test_create_data_values ( self ) : <EOL> assert self . data_values != [ ] <EOL> assert self . data_values [ <NUM_LIT:0> ] . id != None <EOL> def test_site_relationship ( self ) : <EOL> site = self . data_values [ <NUM_LIT:0> ] . site <EOL> assert site != None <EOL> assert site . id != None <EOL> def test_variable_relationship ( self ) : <EOL> var = self . data_values [ <NUM_LIT:0> ] . variable <EOL> assert var != None <EOL> assert var . id != None <EOL> def test_method_relationship ( self ) : <EOL> method = self . data_values [ <NUM_LIT:0> ] . method <EOL> assert method != None <EOL> assert method . id != None <EOL> def test_source_relationship ( self ) : <EOL> source = self . data_values [ <NUM_LIT:0> ] . source <EOL> assert source != None <EOL> assert source . id != None <EOL> def test_qcl_relationship ( self ) : <EOL> qcl = self . data_values [ <NUM_LIT:0> ] . quality_control_level <EOL> assert qcl != None <EOL> assert qcl . id != None <EOL> def test_list_repr ( self ) : <EOL> dv = self . data_values [ <NUM_LIT:0> ] <EOL> assert len ( dv . list_repr ( ) ) == <NUM_LIT> <EOL> assert dv . id in dv . list_repr ( ) </s>
