예제 #1
0
파일: testUtils.py 프로젝트: CGTIC/Plone_SP
 def testRequestPassedToChecker(self):
     checker = DummyChecker()
     wrapped = protect(checker)(funcWithRequest)
     request = []
     wrapped("one", "two", request)
     self.failUnless(checker.request is request)
예제 #2
0
파일: testUtils.py 프로젝트: CGTIC/Plone_SP
 def testMixedArguments(self):
     wrapped = protect()(funcWithRequest)
     self.assertEqual(wrapped("one", two="two"), ("one", "two"))
예제 #3
0
파일: testUtils.py 프로젝트: CGTIC/Plone_SP
 def testFunctionMustHaveRequest(self):
     protector = protect()
     self.assertRaises(ValueError, protector, funcWithoutRequest)
예제 #4
0
 def testRequestPassedToChecker(self):
     checker = DummyChecker()
     wrapped = protect(checker)(funcWithRequest)
     request = []
     wrapped("one", "two", request)
     self.failUnless(checker.request is request)
예제 #5
0
 def testMixedArguments(self):
     wrapped = protect()(funcWithRequest)
     self.assertEqual(wrapped("one", two="two"), ("one", "two"))
예제 #6
0
 def testFunctionMustHaveRequest(self):
     protector = protect()
     self.assertRaises(ValueError, protector, funcWithoutRequest)