Commits

Tarek Ziadé committed 0b23d2f

forgot to add a file

Comments (0)

Files changed (1)

+import unittest
+from proxy import start, stop
+
+import code
+from code import sync_session
+
+proxy_config = {'scheme': 'https',
+                'proxy': False,
+                'netloc': 'stage-auth.services.mozilla.com',
+                'data': 'record'}
+
+def test_sync_session_record():
+    # starting the proxy
+    port = start(proxy_config)
+
+    # changing the config of the app so it uses the proxy
+    code.server = 'http://localhost:%d' % port
+
+    # now run the code that calls a third-party server
+    try:
+        res = sync_session()
+    finally:
+        # stopping the proxy
+        stop()
+
+    assert res