@@ -0,0 +1,1055 @@
+import pytest%0Afrom mailthon.response import Response, SendmailResponse%0A%0A%0A@pytest.fixture(params=(250, 255))%0Adef reply(request):%0A    return (request.param, 'message')%0A%0A%0A@pytest.fixture(params=%5B(), %7B'addr': (255, 'reason')%7D%5D)%0Adef rejected(request):%0A    return dict(request.param)%0A%0A%0Aclass TestResponse:%0A    def test_ok(self, reply):%0A        r = Response(reply)%0A        if r.status_code == 250:%0A            assert r.ok%0A        else:%0A            assert not r.ok%0A%0A    def test_attributes(self, reply):%0A        r = Response(reply)%0A        assert reply == (r.status_code, r.message)%0A%0A%0Aclass TestSendmailResponse:%0A    def test_ok(self, reply, rejected):%0A        r = SendmailResponse(reply, rejected)%0A        if r.status_code == 250 and not rejected:%0A            assert r.ok%0A        else:%0A            assert not r.ok%0A%0A    def test_rejected(self, reply, rejected):%0A        r = SendmailResponse(reply, rejected)%0A        if rejected:%0A            r2 = r.rejected%5B'addr'%5D%0A%0A            assert (r2.status_code, r2.message) == rejected%5B'addr'%5D%0A            assert not r2.ok%0A

test response objects