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

        twill = Twill(self.app)

        self.assertEqual(twill.host, "127.0.0.1")
        self.assertEqual(twill.port, 5000)
        self.assertTrue(twill.browser is not None)
コード例 #2
0
    def create_app(self):
        """Create and return a testing flask app."""

        app = create_app(TestConfig)
        self.twill = Twill(app, port=3000)
        return app
コード例 #3
0
 def test_make_twill_url(self):
     with Twill(self.app) as t:
         self.assertEqual(t.url("/"), "http://127.0.0.1:5000/")
コード例 #4
0
 def create_app(self):
     app = create_app()
     self.twill = Twill(app)
     return app