Esempio n. 1
0
 def testShouldThinkSessionDocumentIsInvalidIfTitleIsCorrect(self):
     """Login is failure if the response document has the correct title."""
     source = SessionScreenscrapeSource()
     document = "<html><head><title>Please Login</title></head><body></body></html>"
     
     is_valid = source.body_is_valid_session(document)
     
     self.assertEqual(is_valid, False)
Esempio n. 2
0
 def testShouldKnowAboutASimpleInvalidSessionDocumentBody(self):
     """Screenscrape source should have a simple document that triggers login failure"""
     source = SessionScreenscrapeSource()
     document = SessionScreenscrapeSource.SIMPLE_FAILURE_DOCUMENT
     
     is_valid = source.body_is_valid_session(document)
     
     self.assert_(not is_valid)
Esempio n. 3
0
 def testShouldThinkSessionDocumentIsValidIfTitleIsCorrect(self):
     """Login is successful if the response document has the correct title."""
     source = SessionScreenscrapeSource()
     document = "<html><head><title>My Message Manager</title></head><body></body></html>"
     
     is_valid = source.body_is_valid_session(document)
     
     self.assertEqual(is_valid, True)