私はファクトリーボーイを使用しています。これは私の工場です:
class ConFactory(factory.Factory):
FACTORY_FOR = Con
user = factory.SubFactory(UserFactory)
category = '1'
number = '12345678'
time_start = factory.Sequence(lambda n:(datetime.now() + timedelta(days=n)).date(), int)
time_end = factory.Sequence(lambda n:(datetime.now() + timedelta(days=n+100)).date(), int)
reminder = datetime.now()
+14日reminder
の設定方法time_start
reminder
=time_start + 14 days