mirror of
https://github.com/khoaliber/khoj.git
synced 2026-03-02 21:19:12 +00:00
Add default settings to let new users be subscribed on trial
- Add the default user to a subscription trial - Update associated unit tests
This commit is contained in:
@@ -9,6 +9,7 @@ from database.models import (
|
||||
OpenAIProcessorConversationConfig,
|
||||
UserConversationConfig,
|
||||
Conversation,
|
||||
Subscription,
|
||||
)
|
||||
|
||||
|
||||
@@ -68,3 +69,12 @@ class ConversationFactory(factory.django.DjangoModelFactory):
|
||||
model = Conversation
|
||||
|
||||
user = factory.SubFactory(UserFactory)
|
||||
|
||||
|
||||
class SubscriptionFactory(factory.django.DjangoModelFactory):
|
||||
class Meta:
|
||||
model = Subscription
|
||||
|
||||
user = factory.SubFactory(UserFactory)
|
||||
type = "trial"
|
||||
is_recurring = False
|
||||
|
||||
Reference in New Issue
Block a user