Title: New test module in django with python 2 not working
Tags: python;django;selenium
Question: I was following the TDD at  O'Reilly  and I tried to make the functional_tests to run in isolation as shown here
But I'm getting the error:
ImproperlyConfigured: App with label functional_tests could not be found
Directory structure is as below:
├── functional_tests/
│   ├── init.py
│   └── tests.py
├── apps/
│   ├── models.py
tests.py contains following code:
from django.test.client import Client
from django.contrib.auth.models import User
from django.test import LiveServerTestCase
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
class FunctionalTest(LiveServerTestCase):
def setUp(self):
self.browser = webdriver.Firefox()
self.browser.implicitly_wait(3)
self.c = Client()
self.user = User.objects.create_user(
username="admin", email="prattnicolas@example.com", password="admin")
def tearDown(self):
self.browser.quit()
def test_admin_login(self):
self.browser.get(self.live_server_url)
# login = self.browser.find_element_by_link_text("Login")
Please tell me what am I doing wrong?

Here is the accepted answer: If you want to run your tests with python manage.py test functional_tests as it shown in the article you should keep functional_tests app in the INSTALLED_APPS. And make sure your PYTHONPATH is set up properly.


{'source': 'StackExchangeDataset', 'subset': 'stackoverflow.com', 'metadata': {'AnswerCount': 1, 'CommentCount': 0, 'ContentLicense': 'CC BY-SA 3.0', 'CreationDate': '2015:00:01/12/15', 'FavoriteCount': None, 'PostTypeId': 1, 'Tags': '<python><django><selenium>', 'Title': 'New test module in django with python 2 not working', 'ViewCount': 37, 'id': 27897307, 'user_AboutMe': "<p>Python professional with over 5 years of experience. Currently working as a Django developer.\nI'm a programmer, portrait artist, a photographer and a rubik's cube solver.\nI like traveling, meeting new people and trying new food.\nI love playing video games and I'm a music junkie.</p>\n", 'user_AccountId': 1854664.0, 'user_DisplayName': 'yogkm', 'user_Reputation': 649.0, 'user_Views': 78.0, 'user_id': 1680521.0}}