<commit_before>from tastypie import http
from tastypie.authorization import Authorization
from test_utils import RequestFactory

from amo.tests import TestCase
from mkt.api.base import MarketplaceResource


class TestMarketplace(TestCase):
    def setUp(self):
        self.resource = MarketplaceResource()
        self.resource._meta.authorization = Authorization()
        self.request = RequestFactory().post('/')

    def test_form_encoded(self):
        """<commit_msg>Fix failing TestMarketplace test by ensuring vanilla authentication and authorization<commit_after>from tastypie import http
from tastypie.authentication import Authentication
from tastypie.authorization import Authorization
from test_utils import RequestFactory

from amo.tests import TestCase
from mkt.api.base import MarketplaceResource


class TestMarketplace(TestCase):
    def setUp(self):
        self.resource = MarketplaceResource()

        # Ensure that we have proper authentication and authorization.
        self.resource._meta.authentication = Authentication()
        self.resource._meta.authorization = Authorization()

        self.request = RequestFactory().post('/')

    def test_form_encoded(self):
        """
{'fraction_non_alphanumeric': 0.07213930348258707, 'fraction_numerical': 0.0, 'mean_word_length': 4.270742358078603, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4481505', 'n_tokens_mistral': 305, 'n_tokens_neox': 293, 'n_words': 87}