-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make browser tests work with new editor
- Loading branch information
1 parent
1f57d39
commit 1465ee2
Showing
6 changed files
with
182 additions
and
147 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# -*- coding: utf-8 -*- | ||
from __future__ import unicode_literals, absolute_import | ||
import pytest | ||
|
||
from django.core.urlresolvers import reverse | ||
|
||
from . import factories | ||
|
||
|
||
@pytest.fixture | ||
def admin_user(live_server, browser): | ||
username = 'peter.griffin' | ||
email = 'peter@griffin.com' | ||
password = 'lazyonthecouch' | ||
|
||
user = factories.UserFactory( | ||
username=username, email=email, password=password, is_staff=True) | ||
|
||
browser.visit(live_server.url + reverse('admin:index')) | ||
browser.fill_form({'username': username, 'password': password}) | ||
browser.find_by_css("input[type='submit']").first.click() | ||
return user |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.