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 52: | f21c71f537eb |
| parent 51: | 0c73f83f8d5a |
| branch: | default |
Added minimal rss/atom mimetype coverage to the mimetype detection test.
2 years ago
Changed (Δ376 bytes):
raw changeset »
tests/test_modelview/tests.py (8 lines added, 0 lines removed)
Up to file-list tests/test_modelview/tests.py:
| … | … | @@ -254,6 +254,14 @@ class ModelViewTest(TestCase): |
254 |
254 |
def test_detecting_responder_by_mimetype(self): |
255 |
255 |
a = Article.objects.all()[0] |
256 |
256 |
|
257 |
# test "application/rss+xml" |
|
258 |
response = self.client.get('/articles/%s/' % a.slug, CONTENT_TYPE='application/rss+xml') |
|
259 |
self.assertEqual(response.status_code, 200) |
|
260 |
||
261 |
# test "application/atom+xml" |
|
262 |
response = self.client.get('/articles/%s/' % a.slug, CONTENT_TYPE='application/atom+xml') |
|
263 |
self.assertEqual(response.status_code, 200) |
|
264 |
||
257 |
265 |
# test 'text/html' |
258 |
266 |
response = self.client.get('/articles/%s/' % a.slug, CONTENT_TYPE='text/html') |
259 |
267 |
self.assertEqual(response.status_code, 200) |
