Skip to content

Commit

Permalink
Add sample functional test
Browse files Browse the repository at this point in the history
  • Loading branch information
mattcen committed Mar 28, 2024
1 parent 8f924d9 commit 5b98e1a
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
Empty file.
28 changes: 28 additions & 0 deletions django/functional_tests/tests.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#!/usr/bin/env python
import unittest
from selenium import webdriver


class NewVisitorTest(unittest.TestCase):
def setUp(self):
self.browser = webdriver.Firefox()

def tearDown(self):
self.browser.quit()

def test_can_start_django(self):
# Edith has heard about a cool new online app
# She goes to check out its homepage
self.browser.get("http://localhost:8000")

# She notices the page title and header mention Django
self.assertIn("Django", self.browser.title)

# She is invited to get started
self.fail("Finish the test!")

# Satisfied, she goes back to sleep


if __name__ == "__main__":
unittest.main()

0 comments on commit 5b98e1a

Please sign in to comment.