def test_it_sets_custom_response_code(self): exc = exceptions.OAuthTokenError('boom', 'mytype', 500) assert exc.status_code == 500
def test_it_sets_type_and_message(self): exc = exceptions.OAuthTokenError('boom', 'mytype') assert exc.type == 'mytype' assert str(exc) == 'boom'
def test_it_sets_default_response_code(self): exc = exceptions.OAuthTokenError('boom', 'mytype') assert exc.status_code == 400
def test_it_sets_type_and_message(self): exc = exceptions.OAuthTokenError("boom", "mytype") assert exc.type == "mytype" assert str(exc) == "boom"