Created
January 5, 2012 11:05
-
-
Save jsanchezpando/1564761 to your computer and use it in GitHub Desktop.
base for test logged django site pages
This file contains hidden or 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
from django.contrib.auth.models import User | |
class LoggedTestCase(TestCase): | |
def setUp(self): | |
self.user = User.objects.create_user('admin', '[email protected]', 'pwd') | |
self.user.save() | |
self.client = Client() | |
self.client.login(username='admin', password='pwd') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment