Skip to content

Commit

Permalink
Excluding GAE, sendmail, and SES from the tests and fixed a DNS-relat…
Browse files Browse the repository at this point in the history
…ed bug in the validation tests.
  • Loading branch information
amcgregor committed Nov 18, 2011
1 parent 3c2585a commit 482f17a
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 4 deletions.
2 changes: 1 addition & 1 deletion marrow/mailer/transport/gae.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@



class AppEngineTransport(object):
class AppEngineTransport(object): # pragma: no cover
__slots__ = ('ephemeral', )

def __init__(self, config):
Expand Down
2 changes: 1 addition & 1 deletion marrow/mailer/transport/sendmail.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@



class SendmailTransport(object):
class SendmailTransport(object): # pragma: no cover
__slots__ = ('ephemeral', 'executable')

def __init__(self, config):
Expand Down
2 changes: 1 addition & 1 deletion marrow/mailer/transport/ses.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@



class AmazonTransport(object):
class AmazonTransport(object): # pragma: no cover
__slots__ = ('ephemeral', 'id', 'key', 'host', 'connection')

def __init__(self, config):
Expand Down
7 changes: 6 additions & 1 deletion tests/test_validator.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@

"""Test the primary configurator interface, Delivery."""

import DNS
import logging

from unittest import TestCase
from nose.tools import ok_, eq_, raises
from nose.plugins.skip import Skip, SkipTest

from marrow.mailer.validator import ValidationException, BaseValidator, DomainValidator, EmailValidator, EmailHarvester

Expand Down Expand Up @@ -112,7 +114,10 @@ def test_domain_validation():
]

def closure(domain, expect):
eq_(mock.validate_domain(domain), (domain, expect))
try:
eq_(mock.validate_domain(domain), (domain, expect))
except DNS.DNSError:
raise SkipTest("Skipped due to DNS error.")

for domain, expect in dataset:
yield closure, domain, expect
Expand Down
1 change: 1 addition & 0 deletions tests/transport/test_gae.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Use: http://pypi.python.org/pypi/gaetestbed

0 comments on commit 482f17a

Please sign in to comment.