When I try to run my functional tests (that I wrote based on the TDD book), it gets hung up and never progresses. Which is weird because it used to work just fine.
I run the test with:
(django18)02:13 ~/development (master)$ xvfb-run -a python3.4 manage.py test functional_tests
It gets to:
Creating test database for alias 'default'...
And never gets past it. (Even if you let it run for an hour.) I commented most of the functional_test file to figure out where it was hanging up, and it's this line:
self.browser.get('http://larapsodia.pythonanywhere.com')
If I change that URL to my production site (http://www.tunisiandictionary.com) — or google.com or any other site — it doesn't get hung up. Only with the pythonanywhere address.
Like I said, it was working just fine yesterday or the day before, and I haven't changed anything on the site. (I might have tried to change some things but nothing that I kept.) My full code up to that point is below.
Any idea what's going on?
Thanks,
Karen
from django.test import LiveServerTestCase
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
class NewVisitorTest(LiveServerTestCase):
def setUp(self):
self.browser = webdriver.Firefox()
self.browser.implicitly_wait(3)
def tearDown(self):
self.browser.quit()
def test_page_displays(self):
# Noelle just came across a Tunisian word that she
# doesn't know. She goes to a new dictionary site
# to find it
self.browser.get('http://larapsodia.pythonanywhere.com')