Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from django.utils import unittest
- from django.test import TestCase
- from django.test.client import Client
- from django.contrib.auth.models import User
- from models import Article, ArticleRevision
- class ArticleEditTest(TestCase):
- def setUp(self):
- user = User.objects.create_user('GKC', 'GKC@whitehorse.com', 'Thursday')
- user.save()
- def testArticleCreation(self):
- c = Client()
- c.login(username='GKC', password='Thursday')
- c.post('/testwiki/Brown/edit/', {'name':'Brown', 'content':'The Hammer of God'})
- self.brown = c.get('/testwiki/Brown/')
- self.assertContains(self.brown.content, "The Hammer of God")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement