From cf3ff26306d1a9fc5736738a7c6afc6ffbf926a7 Mon Sep 17 00:00:00 2001 From: Ubuntu Date: Thu, 26 Jan 2012 17:44:00 +0000 Subject: [PATCH] Adding screen to payment selenium tests --- payment/tests.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/payment/tests.py b/payment/tests.py index 5ea6e74e..78defcff 100644 --- a/payment/tests.py +++ b/payment/tests.py @@ -20,10 +20,14 @@ import time from selenium import webdriver from selenium.webdriver.support.ui import WebDriverWait import logging - +import os from decimal import Decimal as D import datetime +def setup_selenium(): + # Set the display window for our xvfb + os.environ['DISPLAY'] = ':99' + def set_test_logging(): # Setup debug logging to our console so we can watch @@ -95,6 +99,7 @@ class PledgeTest(TestCase): # This is an empty array where we will store any verification errors # we find in our tests + setup_selenium() self.selenium = webdriver.Firefox() set_test_logging() @@ -191,6 +196,7 @@ class AuthorizeTest(TestCase): # This is an empty array where we will store any verification errors # we find in our tests + setup_selenium() self.selenium = webdriver.Firefox() set_test_logging() @@ -269,4 +275,4 @@ def suite(): suites = unittest.TestSuite([unittest.TestLoader().loadTestsFromTestCase(testcase) for testcase in testcases]) return suites - \ No newline at end of file +