Created
March 9, 2012 18:03
-
-
Save davidread/2007796 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/ckan/tests/functional/api/model/test_package.py b/ckan/tests/functional/api/model/test_package.py | |
index eed3e1a..beca564 100644 | |
--- a/ckan/tests/functional/api/model/test_package.py | |
+++ b/ckan/tests/functional/api/model/test_package.py | |
@@ -245,6 +245,18 @@ class PackagesTestCase(BaseModelApiTestCase): | |
res = self.app.post(offset, params=postparams, status=self.STATUS_400_BAD_REQUEST, | |
extra_environ=self.extra_environ) | |
+ def test_register_post_bad_request_2(self): | |
+ test_params = { | |
+ 'name':u'testpackage07_400', | |
+ 'extras':[ # should not be a list in here | |
+ {u'key': u'value'} | |
+ ], | |
+ } | |
+ offset = self.offset('/rest/dataset') | |
+ postparams = '%s=1' % self.dumps(test_params) | |
+ res = self.app.post(offset, params=postparams, status=self.STATUS_400_BAD_REQUEST, | |
+ extra_environ=self.extra_environ) | |
+ | |
def test_register_post_denied(self): | |
offset = self.offset('/rest/dataset') | |
postparams = '%s=1' % self.dumps(self.package_fixture_data) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment