<s> import os <EOL> from onadata . apps . logger . models import XForm , Instance <EOL> from test_base import TestBase <EOL> class TestInputs ( TestBase ) : <EOL> """<STR_LIT>""" <EOL> def test_uniqueness_of_group_names_enforced ( self ) : <EOL> pre_count = XForm . objects . count ( ) <EOL> self . _create_user_and_login ( ) <EOL> response = self . _publish_xls_file ( <EOL> '<STR_LIT>' ) <EOL> self . assertTrue ( <EOL> "<STR_LIT>" <EOL> in response . content ) <EOL> self . assertEqual ( XForm . objects . count ( ) , pre_count ) <EOL> def test_mch ( self ) : <EOL> self . _publish_xls_file ( '<STR_LIT>' ) <EOL> def test_erics_files ( self ) : <EOL> for name in [ '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' ] : <EOL> self . _publish_xls_file ( os . path . join ( '<STR_LIT>' , '<STR_LIT>' , name ) ) <EOL> class TestSubmissionBugs ( TestBase ) : <EOL> def test_submission_with_mixed_case_username ( self ) : <EOL> self . _publish_transportation_form ( ) <EOL> s = self . surveys [ <NUM_LIT:0> ] <EOL> count = Instance . objects . count ( ) <EOL> self . _make_submission ( <EOL> os . path . join ( <EOL> self . this_directory , '<STR_LIT>' , <EOL> '<STR_LIT>' , '<STR_LIT>' , s , s + '<STR_LIT>' ) , '<STR_LIT>' ) <EOL> self . assertEqual ( Instance . objects . count ( ) , count + <NUM_LIT:1> ) <EOL> class TestCascading ( TestBase ) : <EOL> def test_correct_id_string_picked ( self ) : <EOL> XForm . objects . all ( ) . delete ( ) <EOL> name = '<STR_LIT>' <EOL> id_string = u'<STR_LIT>' <EOL> self . _publish_xls_file ( os . path . join ( <EOL> self . this_directory , '<STR_LIT>' , '<STR_LIT>' , name ) ) <EOL> self . assertEqual ( XForm . objects . count ( ) , <NUM_LIT:1> ) <EOL> xform_id_string = XForm . objects . all ( ) [ <NUM_LIT:0> ] . id_string <EOL> self . assertEqual ( xform_id_string , id_string ) </s>
