@override_settings(
        CELERY_ALWAYS_EAGER=False,
        CELERY_EAGER_PROPAGATES_EXCEPTIONS=False,
    )
    def test_public_crash_upload(self):
        url = '%s%s' % (self.live_server_url, reverse('crash'))
        mini_dump_file = SimpleUploadedFile("minidump.dat", b"content")
        form_data = dict(
            appid='{D0AB2EBC-931B-4013-9FEB-C9C4C2225C8C}',
            userid='{2882CF9B-D9C2-4edb-9AAF-8ED5FCF366F7}',
        )
        files = dict(
            upload_file_minidump=mini_dump_file,
        )
        self.assertEqual(Crash.objects.all().count(), 0)
        response = requests.post(url, form_data, files=files)
        self.assertEqual(response.status_code, 200)
        self.assertEqual(Crash.objects.all().count(), 1)
        obj = Crash.objects.get()
        self.assertEqual(response.content.decode(), str(obj.pk))
        self.assertIsNotNone(obj.upload_file_minidump)
dataset/ETHPy150Open Crystalnix/omaha-server/omaha_server/omaha/tests/test_public.py/PublicTests.test_public_crash_upload/original