actually.. return a 400 rather than a 404 because the request is malformed. Also add unit test.

This commit is contained in:
Chris Dodge
2013-03-26 20:02:29 -04:00
parent a44ecdfcd6
commit b0e2c82ad3
2 changed files with 6 additions and 1 deletions

View File

@@ -213,6 +213,10 @@ class ContentStoreToyCourseTest(ModuleStoreTestCase):
resp = self.client.get(reverse('edit_unit', kwargs={'location': new_loc.url()}))
self.assertEqual(resp.status_code, 200)
def test_bad_contentstore_request(self):
resp = self.client.get('http://localhost:8001/c4x/CDX/123123/asset/&images_circuits_Lab7Solution2.png')
self.assertEqual(resp.status_code, 400)
def test_delete_course(self):
import_from_xml(modulestore(), 'common/test/data/', ['full'])