david / django-modelviews
Backup of an old repository with useful ideas. Initial goal: integrating REST to django admin (class-based views).
Clone this repository (size: 85.8 KB): HTTPS / SSH
$ hg clone http://code.welldev.org/django-modelviews
| commit 53: | 45d3937d57aa |
| parent 52: | f21c71f537eb |
| branch: | default |
Removed the test testing the Article model, since it was a sanity
check for setting up the test environment.
2 years ago
Changed (Δ365 bytes):
raw changeset »
tests/test_modelview/tests.py (1 lines added, 10 lines removed)
Up to file-list tests/test_modelview/tests.py:
| … | … | @@ -3,16 +3,6 @@ from models import Article, Comment |
3 |
3 |
from django.utils import simplejson |
4 |
4 |
from django.contrib.auth.models import User |
5 |
5 |
from xml.dom.minidom import parseString |
6 |
||
7 |
||
8 |
class ArticleTest(TestCase): |
|
9 |
def test_model(self): |
|
10 |
a = Article.objects.create(name="An article", |
|
11 |
slug="an-article", |
|
12 |
body="some text") |
|
13 |
self.assertEqual(a.name, "An article") |
|
14 |
self.assertEqual(a.slug, "an-article") |
|
15 |
self.assertEqual(a.body, "some text") |
|
16 |
6 |
|
17 |
7 |
|
18 |
8 |
class ModelViewTest(TestCase): |
| … | … | @@ -20,6 +10,7 @@ class ModelViewTest(TestCase): |
20 |
10 |
Article.objects.create(name="My Story", |
21 |
11 |
slug="my-story", |
22 |
12 |
body="My thrilling story!") |
13 |
||
23 |
14 |
david = User.objects.create_user('david', 'foo@example.com', 'baz') |
24 |
15 |
will = User.objects.create_user('will', 'bar@example.com', 'baz') |
25 |
16 |
Comment.objects.create(content="David comment", user=david) |
