Pecan assuming meter names are extensions
disable Pecan guessing content_type based on url path Change-Id: I23862af3a9ae41980a8c3f33bf569acf9ff77a08 Fixes: Bug #1224132
This commit is contained in:
@@ -65,6 +65,15 @@ class TestApp(base.TestCase):
|
||||
os.unlink(tmpfile)
|
||||
|
||||
|
||||
class TestPecanApp(FunctionalTest):
|
||||
database_connection = tests_db.MongoDBFakeConnectionUrl()
|
||||
|
||||
def test_pecan_extension_guessing_unset(self):
|
||||
# check Pecan does not assume .jpg is an extension
|
||||
response = self.app.get(self.PATH_PREFIX + '/meters/meter.jpg')
|
||||
self.assertEqual(response.content_type, 'application/json')
|
||||
|
||||
|
||||
class TestApiMiddleware(FunctionalTest):
|
||||
|
||||
# This doesn't really matter
|
||||
|
||||
Reference in New Issue
Block a user