def test_valid_identity_files_valid(self): filename = self.private_file.name fh_private = open(filename + '.pub', 'w') try: config = config_parse.valid_identity_file(filename, self.context) finally: fh_private.close() os.unlink(fh_private.name) assert_equal(config, filename)
def test_valid_identity_files_missing_with_partial_context(self): path = '/bogus/file/does/not/exist' context = config_utils.PartialConfigContext('path', 'MASTER') file_path = config_parse.valid_identity_file(path, context) assert_equal(path, file_path)