diff options
| author | Tom Christie | 2011-04-27 18:28:20 +0100 |
|---|---|---|
| committer | Tom Christie | 2011-04-27 18:28:20 +0100 |
| commit | fb805bbb7ca80808258520219330cc5fb3bc0517 (patch) | |
| tree | ce9ce7db8f27041df48d71248b447c61887b04d3 /examples/pygments_api/tests.py | |
| parent | 683a862ddf395d9c57ba323c40d734666d083d37 (diff) | |
| parent | 116a9ee82486fb31a9132db837569460fe1eb5da (diff) | |
| download | django-rest-framework-fb805bbb7ca80808258520219330cc5fb3bc0517.tar.bz2 | |
Pulling Marko's test fixes
Diffstat (limited to 'examples/pygments_api/tests.py')
| -rw-r--r-- | examples/pygments_api/tests.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/examples/pygments_api/tests.py b/examples/pygments_api/tests.py index b4b01e8d..3bdc2ec5 100644 --- a/examples/pygments_api/tests.py +++ b/examples/pygments_api/tests.py @@ -28,12 +28,14 @@ class TestPygmentsExample(TestCase): def test_snippets_datetime_sorted(self):
'''Pygments examples should be datetime sorted'''
locations = []
- for snippet in 'abcdefghijk':
+ for snippet in 'abcdefghij': # String length must not exceed views.MAX_FILES, otherwise test fails
form_data = {'code': '%s' % snippet, 'style':'friendly', 'lexer':'python'}
request = self.factory.post('/pygments', data=form_data)
view = views.PygmentsRoot.as_view()
response = view(request)
locations.append(response.items()[2][1])
+ import time
+ time.sleep(.1)
request = self.factory.get('/pygments')
view = views.PygmentsRoot.as_view()
response = view(request)
|
