def test_lookup(self):
        assert event.Priority.lookup(event.Priority.CORE) is event.Priority.CORE
        assert event.Priority.lookup(event.Priority.CORE.value) is event.Priority.CORE
        assert event.Priority.lookup(-12312412) == -12312412
def test_regex_flags_good_input():
    cases = (
        'abcd',
        'ABCabc',
        'ABC',
    )

    case_insensitive = inputs.regex(r'^[A-Z]+$', re.IGNORECASE)

    for value in cases:
        yield assert_equal, case_insensitive(value), value