test_project_similar_issues.py 1.1 KB

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