我使用工厂男孩,这是我的工厂:
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()
如何设置reminder
为time_start
+ 14 天
reminder
=time_start + 14 days