thirdparty/google_appengine/lib/django/tests/regressiontests/dispatch/tests/test_robustapply.py
equal
deleted
inserted
replaced
1 from django.dispatch.robustapply import * |
|
2 |
|
3 import unittest |
|
4 |
|
5 def noArgument(): |
|
6 pass |
|
7 |
|
8 def oneArgument(blah): |
|
9 pass |
|
10 |
|
11 def twoArgument(blah, other): |
|
12 pass |
|
13 |
|
14 class TestCases(unittest.TestCase): |
|
15 def test01(self): |
|
16 robustApply(noArgument) |
|
17 |
|
18 def test02(self): |
|
19 self.assertRaises(TypeError, robustApply, noArgument, "this") |
|
20 |
|
21 def test03(self): |
|
22 self.assertRaises(TypeError, robustApply, oneArgument) |
|
23 |
|
24 def test04(self): |
|
25 """Raise error on duplication of a particular argument""" |
|
26 self.assertRaises(TypeError, robustApply, oneArgument, "this", blah = "that") |
|
27 |
|
28 def getSuite(): |
|
29 return unittest.makeSuite(TestCases,'test') |
|
30 |
|
31 |
|
32 if __name__ == "__main__": |
|
33 unittest.main() |
|
34 |
|