@override_settings(DEBUG=False)
    def test_api_returns_decorator(self):
        original_log_level = logger.level
        logger.setLevel(1000)

        @api_returns({
            200: 'OK',
            403: 'Permission denied',
        })
        def simple_view(request):
            if 'ok' in request.GET:
                return JsonResponse()
            elif 'noperm' in request.GET:
                return JsonResponseForbidden()
            else:
                return JsonResponseAccepted()  # Not declared in @api_returns

        rf = RequestFactory()
        request = rf.get('/simple_view', data={'bad': '1'})
        response = simple_view(request)
        self.assertEquals(response.status_code, 202)
        logger.setLevel(original_log_level)
Create NMEAStreamReader object.
dataset/ETHPy150Open bipsandbytes/django-api/django_api/tests.py/SimpleTest.test_api_returns_decorator--crossover with--dataset/ETHPy150Open Knio/pynmea2/pynmea2/stream.py/NMEAStreamReader.__init__