mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2026-09-03 20:52:56 -05:00
Quite a bit of work on new public errors and their unit tests
This commit is contained in:
@@ -99,6 +99,14 @@ class ExceptionNotRaised(Exception):
|
||||
return self.msg % self.expected.__name__
|
||||
|
||||
|
||||
def assert_equal(val1, val2):
|
||||
"""
|
||||
Assert ``val1`` and ``val2`` are the same type and of equal value.
|
||||
"""
|
||||
assert type(val1) is type(val2), '%r != %r' % (val1, val2)
|
||||
assert val1 == val2, '%r != %r' % (val1, val2)
|
||||
|
||||
|
||||
def raises(exception, callback, *args, **kw):
|
||||
"""
|
||||
Tests that the expected exception is raised; raises ExceptionNotRaised
|
||||
|
||||
Reference in New Issue
Block a user