def test_questions_by_locale(self):
        # An en-US question with a solution:
        q = QuestionFactory(locale='en-US')
        a = AnswerFactory(question=q)
        q.solution = a
        q.save()
        # An en-US question with an answer:
        q = QuestionFactory(locale='en-US')
        AnswerFactory(question=q)
        # An en-US question without answers:
        QuestionFactory(locale='en-US')

        # A pt-BR question without answers:
        QuestionFactory(locale='pt-BR')

        # Verify no locale filtering:
        r = self._get_api_result('api.kpi.questions')
        eq_(r['objects'][0]['solved'], 1)
        eq_(r['objects'][0]['responded_24'], 2)
        eq_(r['objects'][0]['responded_72'], 2)
        eq_(r['objects'][0]['questions'], 4)

        # Verify locale=en-US
        r = self._get_api_result('api.kpi.questions', locale='en-US')
        eq_(r['objects'][0]['solved'], 1)
        eq_(r['objects'][0]['responded_24'], 2)
        eq_(r['objects'][0]['responded_72'], 2)
        eq_(r['objects'][0]['questions'], 3)

        # Verify locale=pt-BR
        r = self._get_api_result('api.kpi.questions', locale='pt-BR')
        eq_(r['objects'][0]['questions'], 1)
        assert 'solved' not in r['objects'][0]
        assert 'responded_24' not in r['objects'][0]
        assert 'responded_72' not in r['objects'][0]
Returns the full, original URL used to access the relative URL.
dataset/ETHPy150Open mozilla/kitsune/kitsune/kpi/tests/test_api.py/KpiApiTests.test_questions_by_locale--crossover with--dataset/ETHPy150Open AppScale/appscale/AppServer/google/appengine/tools/dev_appserver.py/GetFullURL