diff --git a/ingest/tests.py b/ingest/tests.py index eaa0819..ae06e55 100644 --- a/ingest/tests.py +++ b/ingest/tests.py @@ -312,8 +312,10 @@ class IngestViewTestCase(TransactionTestCase): # as per send_json command ("weirdly enough a large numer of sentry test data don't actually...") data["timestamp"] = time.time() - if not command.is_valid(data, filename) and filename not in known_broken: - raise Exception("validatity check in %s: %s" % (filename, command.stderr.getvalue())) + if not command.is_valid(data, filename): + if filename not in known_broken: + raise Exception("validatity check in %s: %s" % (filename, command.stderr.getvalue())) + command.stderr = io.StringIO() # reset the error buffer; needed in the loop w/ known_broken event_id = data["event_id"] if not include_event_id: @@ -367,8 +369,10 @@ class IngestViewTestCase(TransactionTestCase): # as per send_json command ("weirdly enough a large numer of sentry test data don't actually...") data["timestamp"] = time.time() - if not command.is_valid(data, filename) and filename not in known_broken: - raise Exception("validatity check in %s: %s" % (filename, command.stderr.getvalue())) + if not command.is_valid(data, filename): + if filename not in known_broken: + raise Exception("validatity check in %s: %s" % (filename, command.stderr.getvalue())) + command.stderr = io.StringIO() # reset the error buffer; needed in the loop w/ known_broken event_id = data["event_id"] diff --git a/issues/tests.py b/issues/tests.py index 2b5cce0..7413178 100644 --- a/issues/tests.py +++ b/issues/tests.py @@ -493,8 +493,10 @@ class IntegrationTest(TransactionTestCase): # tested) data["event_id"] = uuid.uuid4().hex - if not command.is_valid(data, filename) and filename not in known_broken: - raise Exception("validatity check in %s: %s" % (filename, command.stderr.getvalue())) + if not command.is_valid(data, filename): + if filename not in known_broken: + raise Exception("validatity check in %s: %s" % (filename, command.stderr.getvalue())) + command.stderr = StringIO() # reset the error buffer; needed in the loop w/ known_broken response = self.client.post( f"/api/{ project.id }/store/",