Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(589)

Side by Side Diff: third_party/twisted_8_1/twisted/mail/test/test_options.py

Issue 12261012: Remove third_party/twisted_8_1 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/build
Patch Set: Created 7 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1
2 from twisted.trial.unittest import TestCase
3
4 from twisted.python.usage import UsageError
5 from twisted.mail.tap import Options
6
7
8 class OptionsTestCase(TestCase):
9 """
10 Tests for the command line option parser used for C{mktap mail}.
11 """
12 def setUp(self):
13 self.aliasFilename = self.mktemp()
14 aliasFile = file(self.aliasFilename, 'w')
15 aliasFile.write('someuser:\tdifferentuser\n')
16 aliasFile.close()
17
18
19 def testAliasesWithoutDomain(self):
20 """
21 Test that adding an aliases(5) file before adding a domain raises a
22 UsageError.
23 """
24 self.assertRaises(
25 UsageError,
26 Options().parseOptions,
27 ['--aliases', self.aliasFilename])
28
29
30 def testAliases(self):
31 """
32 Test that adding an aliases(5) file to an IAliasableDomain at least
33 doesn't raise an unhandled exception.
34 """
35 Options().parseOptions([
36 '--maildirdbmdomain', 'example.com=example.com',
37 '--aliases', self.aliasFilename])
38
OLDNEW
« no previous file with comments | « third_party/twisted_8_1/twisted/mail/test/test_mail.py ('k') | third_party/twisted_8_1/twisted/mail/test/test_pop3.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698