Exemple #1
0
def test_errorcodes_is_error_string():
    assert ErrorCodes.is_error('foo') is None
Exemple #2
0
def test_errorcodes_is_error():
    """
    Ensures that is_errror can find out whether an error name is valid.
    """
    assert ErrorCodes.is_error('service_name') is True
Exemple #3
0
def test_errorcodes_is_error_none():
    assert ErrorCodes.is_error(None) is None
Exemple #4
0
def test_is_error():
    assert not ErrorCodes.is_error(None)
    assert not ErrorCodes.is_error('foo')
    assert ErrorCodes.is_error('service_name')