test_api.py 592 B

123456789101112131415161718
  1. from django.shortcuts import reverse
  2. from model_bakery import baker
  3. from glitchtip.test_utils.test_case import GlitchTipTestCase
  4. class TransactionAPITestCase(GlitchTipTestCase):
  5. def setUp(self):
  6. self.create_user_and_project()
  7. def test_list(self):
  8. url = reverse(
  9. "organization-transactions-list",
  10. kwargs={"organization_slug": self.organization.slug},
  11. )
  12. transaction = baker.make("performance.TransactionEvent", project=self.project)
  13. res = self.client.get(url)
  14. self.assertContains(res, transaction.transaction)