Skip to content

Instantly share code, notes, and snippets.

@jpic
Forked from jeanphix/gist:1406053
Created February 14, 2013 23:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jpic/4957328 to your computer and use it in GitHub Desktop.
Save jpic/4957328 to your computer and use it in GitHub Desktop.
from ghost.ext.django.test import GhostTestCase
class SessionSecurityTestCase(GhostTestCase):
# Enable display (runs headless with False)
display = True
# Default port for LiveServerTestCase, from django docs:
# https://docs.djangoproject.com/en/1.4/topics/testing/#django.test.LiveServerTestCase
port = 8081
# Shortcut for open
def open(self, url):
self.ghost.open('http://localhost:%s%s' % (self.port, url))
def test_ghost(self):
self.open('/admin/')
self.ghost.wait_for_selector('input[name=username]')
self.assertTrue(True)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment