Exemple #1
0
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)
Exemple #2
0
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
Exemple #4
0
 def test_success(self):
     self.assert_message_from_report(
         "booth name '/name' is not valid (invalid characters)",
         reports.booth_invalid_name("/name", "invalid characters"))