test_project_similar_issues.py 1.2 KB

12345678910111213141516171819202122232425262728293031
  1. from datetime import datetime, timezone
  2. from sentry.testutils.cases import AcceptanceTestCase
  3. from sentry.testutils.silo import no_silo_test
  4. from sentry.utils.samples import create_sample_event
  5. @no_silo_test(stable=True)
  6. class ProjectIssuesGroupingTest(AcceptanceTestCase):
  7. def setUp(self):
  8. super().setUp()
  9. self.user = self.create_user("foo@example.com")
  10. self.org = self.create_organization(owner=self.user, name="Rowdy Tiger")
  11. self.org.flags.early_adopter = True
  12. self.org.save()
  13. self.team = self.create_team(organization=self.org, name="Mariachi Band")
  14. self.project = self.create_project(organization=self.org, teams=[self.team], name="Bengal")
  15. self.login_as(self.user)
  16. def create_sample_event(self, platform):
  17. event = create_sample_event(
  18. project=self.project,
  19. platform=platform,
  20. event_id="d964fdbd649a4cf8bfc35d18082b6b0e",
  21. timestamp=1452683305,
  22. )
  23. event.group.update(
  24. first_seen=datetime(2015, 8, 13, 3, 8, 25, tzinfo=timezone.utc),
  25. last_seen=datetime(2016, 1, 13, 3, 8, 25, tzinfo=timezone.utc),
  26. )
  27. return event