Exemplo n.º 1
0
 def test_call_svn_update( self ):
     """ Tests envoy output command. """
     utils = ProcessorUtils()
     result = utils.call_svn_update()
     # print u'- envoy result...'; pprint.pprint( result )
     self.assertEqual(
         u'Updating',
         result[u'std_out'].split()[0] )
     self.assertEqual(
         True,
         u'Updated to revision' in result[u'std_out'] or u'At revision' in result[u'std_out'] )
Exemplo n.º 2
0
 def test_parse_update_output( self ):
     """ Tests for sorted file_ids when files found. """
     utils = ProcessorUtils()
     ## tests regular xml output
     dummy_stdout = u"""Updating '/path/to/iip/xml':\nU    /path/to/iip/xml/zoor0102.xml\nU    /path/to/iip/xml/beth0068.xml\nA    /path/to/iip/xml/zoor0261.xml\nA  """
     result = utils.parse_update_output( dummy_stdout )
     self.assertEqual( [
         u'beth0068', u'zoor0102', u'zoor0261' ],
         result[u'file_ids'] )
     ## tests empty output
     dummy_stdout = u"""Updating '/path/to/iip/xml':\nU    Updated to revision 11969.\n"""
     result = utils.parse_update_output( dummy_stdout )
     self.assertEqual(
         [],
         result[u'file_ids'] )