Example #1
0
    def test_it_sets_default_message_if_none_provided(self):
        exc = exceptions.ConflictError()

        assert str(exc) == "Conflict"
Example #2
0
    def test_it_sets_provided_message(self):
        exc = exceptions.ConflictError("nah, that's no good")

        assert str(exc) == "nah, that's no good"
Example #3
0
    def test_it_returns_the_correct_http_status(self):
        exc = exceptions.ConflictError()

        assert exc.status_code == 409