mirror of
https://github.com/DarrenOfficial/dpaste.git
synced 2024-11-15 08:02:54 +11:00
Added a test hint
This commit is contained in:
parent
cf4b59b22d
commit
c595d99e6d
1 changed files with 7 additions and 2 deletions
|
@ -18,14 +18,19 @@ class SnippetAPITestCase(TestCase):
|
|||
def test_empty(self):
|
||||
"""
|
||||
The browser sent a content field but with no data.
|
||||
|
||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
|
||||
ALL tests fail due to a Piston bug:
|
||||
https://bitbucket.org/jespern/django-piston/issue/221/attributeerror-httpresponseservererror
|
||||
"""
|
||||
data = {}
|
||||
|
||||
# No data
|
||||
response = self.client.post(self.api_url, {})
|
||||
self.assertEqual(response.status_code, 400)
|
||||
self.assertEqual(Snippet.objects.count(), 0)
|
||||
|
||||
data = {}
|
||||
|
||||
# No content
|
||||
data['content'] = ''
|
||||
response = self.client.post(self.api_url, data)
|
||||
|
|
Loading…
Reference in a new issue