Esempio n. 1
0
def validate_ticket_unique(booth_configuration, ticket_name):
    if ticket_exists(booth_configuration, ticket_name):
        raise LibraryError(reports.booth_ticket_duplicate(ticket_name))
Esempio n. 2
0
def _validate_ticket_unique(conf_facade, ticket_name):
    if conf_facade.has_ticket(ticket_name):
        return [reports.booth_ticket_duplicate(ticket_name)]
    return []
Esempio n. 3
0
def validate_ticket_unique(booth_configuration, ticket_name):
    if ticket_exists(booth_configuration, ticket_name):
        raise LibraryError(reports.booth_ticket_duplicate(ticket_name))
Esempio n. 4
0
 def test_success(self):
     self.assert_message_from_report(
         "booth ticket name 'ticket_name' already exists in configuration",
         reports.booth_ticket_duplicate("ticket_name"))