'Test the ajax asset interfaces'

@mock.patch('xmodule.contentstore.mongo.MongoContentStore.get_all_content_for_course')
def test_mocked_filtered_response(self, mock_get_all_content_for_course):

    asset_key = self.course.id.make_asset_key(AssetMetadata.GENERAL_ASSET_TYPE, 'test.jpg')
    upload_date = datetime(2015, 1, 12, 10, 30, tzinfo=UTC)
    thumbnail_location = ['c4x', 'edX', 'toy', 'thumbnail', 'test_thumb.jpg', None]
    mock_get_all_content_for_course.return_value = [[{'asset_key': asset_key, 'displayname': 'test.jpg', 'contentType': 'image/jpg', 'url': '/c4x/A/CS102/asset/test.jpg', 'uploadDate': upload_date, 'id': '/c4x/A/CS102/asset/test.jpg', 'portable_url': '/static/test.jpg', 'thumbnail': None, 'thumbnail_location': thumbnail_location, 'locked': None}], 1]
    self.assert_correct_filter_response(self.url, 'asset_type', 'OTHER')
