def setUp(self):
     '''
     Perform required setup including setting up logging.
     '''
     setup_logging(logging.DEBUG, 'test_audrey_startup.log')
     self.cloud_info_file = 'cloud_info'
     self.condor_addr_file = 'condor_addr'
     self.condor_uuid_file = 'condor_uuid'
    def setUp(self):
        '''
        Perform required setup including setting up logging.

        This test currently require to be run in a cloud VM
        with a live Config Server.
        '''
        setup_logging(logging.DEBUG, './test_audrey_startup.log')
        # make a copy of argv
        self.argv = list(sys.argv)
    def setUp(self):
        '''
        If the cloud info file is not present assume running in a
        UNITTEST environment. This will allow for exercising some
        of the code without having to be running in a cloud VM.

        Set up logging.
        '''

        setup_logging(logging.DEBUG, './test_audrey_startup.log')

        # Create the client Object
        self.cs_client = CSClient(**DUMMY_CS_CONFIG)
        self.cs_client.http = HttpUnitTest()
 def setUp(self):
     '''
     Perform required setup including setting up logging.
     '''
     setup_logging(logging.DEBUG, './test_audrey_startup.log')
        # replace argv
        sys.argv = list(self.argv)

    def test_audrey_script_main(self):
        '''
        Perform what the audrey script will do.
        '''
        cloud_info_file = 'cloud_info'
        sys.argv.extend(['-p'])
        _write_info_file(cloud_info_file, 'EC2')
        audrey_script_main(HttpUnitTest())
        os.remove(cloud_info_file)

    def test_fail_audrey_script_main(self):
        '''
        Perform what the audrey script will do.
        '''
        self.assertRaises(ASError, audrey_script_main)

    def test_empty_gen_env(self):
        self.assertRaises(ASError, gen_env, '', '')

    # doesn't actually test what I wanted it to.
    #def test_parse_require_config(self):
    #    self.assertRaises(ASError, parse_require_config, '')

if __name__ == '__main__':

    setup_logging(logging.DEBUG, logfile_name='./test_audrey_startup.log')
    unittest.main()