コード例 #1
0
    def SeleniumDrivenUserShouldThrowAnExceptionWhenTheMethodIsUnkownToBothActionsAndExpectations(self):

        try:
            bob = SeleniumDrivenUser(self.mockedContext)
            bob.unknownMethodCall()
            self.fail("unknownMethodCall should of raised an exception")
        except Exception, instance:
            pass
コード例 #2
0
    def SeleniumDrivenUserShouldCallAppropriateActionMethodInExpectationWhenCalledWithAnAction(self):

            mockedGoesToURL = Mock()
            SeleniumDrivenUserActions.goesTo = mockedGoesToURL

            bob = SeleniumDrivenUser(self.mockedContext)
            bob.goesTo("http://www.google.ca")

            self.assertTrue( mockedGoesToURL.called)