def get_booth_env_file_name(name, extension): report_list = [] if "/" in name: report_list.append(reports.booth_invalid_name(name, "contains illegal character '/'")) if report_list: raise LibraryError(*report_list) return "{0}.{1}".format(os.path.join(BOOTH_CONFIG_DIR, name), extension)
def get_booth_env_file_name(name, extension): report_list = [] if "/" in name: report_list.append( reports.booth_invalid_name(name, "contains illegal character '/'")) if report_list: raise LibraryError(*report_list) return "{0}.{1}".format(os.path.join(BOOTH_CONFIG_DIR, name), extension)
def check_instance_name(name): """ Check that specified booth instance name is valid string name -- booth instance name """ report_list = [] if "/" in name: # TODO drop plaintext from the report report_list.append( reports.booth_invalid_name(name, "contains illegal character '/'")) return report_list
def test_success(self): self.assert_message_from_report( "booth name '/name' is not valid (invalid characters)", reports.booth_invalid_name("/name", "invalid characters"))