Skip to content
This repository was archived by the owner on Jun 13, 2025. It is now read-only.

Commit 9f365bd

Browse files
Update
1 parent d4ba9a6 commit 9f365bd

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

api/internal/tests/test_gen_ai.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,12 @@ def setUp(self):
1515
self.repo1 = RepositoryFactory(author=self.owner, name="Repo1")
1616
self.repo2 = RepositoryFactory(author=self.owner, name="Repo2")
1717

18-
self.ai_install = GithubAppInstallation.objects.create(
18+
self.ai_install = GithubAppInstallation(
1919
app_id=AI_FEATURES_GH_APP_ID,
2020
owner=self.owner,
2121
repository_service_ids=[self.repo1.service_id, self.repo2.service_id],
2222
)
23+
self.ai_install.save()
2324

2425
def test_no_owner_id(self):
2526
url = reverse("gen-ai-consent")
@@ -29,7 +30,7 @@ def test_no_owner_id(self):
2930

3031
def test_owner_without_install(self):
3132
# Remove the AI installation so it doesn't exist
32-
self.ai_install.delete()
33+
self.ai_install = None
3334

3435
url = reverse("gen-ai-consent")
3536
response = self.client.get(url, data={"owner_id": self.owner.id})

0 commit comments

Comments
 (0)