Commits

Anonymous committed de82513

alfajor integration

Comments (0)

Files changed (1)

flaskext/testing.py

 """
 from __future__ import absolute_import
 
+import warnings
+
+warnings.simplefilter("ignore")
+
 import StringIO
 import unittest
 import twill
 
 from werkzeug import cached_property
 
+from alfajor import APIClient, WebBrowser
+
 try:
     # we'll use signals for template-related tests if
     # available in this version of Flask
         self._orig_response_class = self.app.response_class
         self.app.response_class = _make_test_response(self.app.response_class)
 
-        self.client = self.app.test_client()
+        self.make_client()
 
         self._ctx = self.app.test_request_context()
         self._ctx.push()
         if _is_signals:
             template_rendered.disconnect(self._add_template)
 
+    def make_client(self):
+
+        self.client = APIClient()
+        self.client.configure_in_scope()
+        
+        self.browser = WebBrowser()
+        self.browser.configure_in_scope()
+
+        
     def assertTemplateUsed(self, name):
         """
         Checks if a given template is used in the request.