def remove_ticket(conf_facade, ticket_name):
    """
    Validate removing a ticket from an existing booth config

    pcs.lib.booth.config_facade.ConfigFacade conf_facade -- a booth config
    string ticket_name -- the name of the ticket
    """
    if not conf_facade.has_ticket(ticket_name):
        return [reports.booth_ticket_does_not_exist(ticket_name)]
    return []
Beispiel #2
0
def validate_ticket_exists(booth_configuration, ticket_name):
    if not ticket_exists(booth_configuration, ticket_name):
        raise LibraryError(reports.booth_ticket_does_not_exist(ticket_name))
Beispiel #3
0
def validate_ticket_exists(booth_configuration, ticket_name):
    if not ticket_exists(booth_configuration, ticket_name):
        raise LibraryError(reports.booth_ticket_does_not_exist(ticket_name))
Beispiel #4
0
 def test_success(self):
     self.assert_message_from_report(
         "booth ticket name 'ticket_name' does not exist",
         reports.booth_ticket_does_not_exist("ticket_name"))