fix test
This commit is contained in:
parent
2deb8c8cfa
commit
25c622360d
|
@ -144,5 +144,3 @@ class BaseProposalCreatorConfig(BaseUserConfig):
|
||||||
def make_proposal_reminder_task(self):
|
def make_proposal_reminder_task(self):
|
||||||
proposal_reminder = ProposalReminder(self.proposal.id)
|
proposal_reminder = ProposalReminder(self.proposal.id)
|
||||||
proposal_reminder.make_task()
|
proposal_reminder.make_task()
|
||||||
from grant.task.models import Task
|
|
||||||
print(Task.query.all()[0].__dict__)
|
|
||||||
|
|
|
@ -11,6 +11,7 @@ class TestTaskAPI(BaseProposalCreatorConfig):
|
||||||
tasks = Task.query.filter(Task.execute_after <= datetime.now()).filter_by(completed=False).all()
|
tasks = Task.query.filter(Task.execute_after <= datetime.now()).filter_by(completed=False).all()
|
||||||
self.assertEqual(tasks, [])
|
self.assertEqual(tasks, [])
|
||||||
self.make_proposal_reminder_task()
|
self.make_proposal_reminder_task()
|
||||||
|
tasks = Task.query.filter(Task.execute_after <= datetime.now()).filter_by(completed=False).all()
|
||||||
self.assertEqual(len(tasks), 1)
|
self.assertEqual(len(tasks), 1)
|
||||||
|
|
||||||
def test_proposal_reminder_task_is_marked_completed_after_call(self):
|
def test_proposal_reminder_task_is_marked_completed_after_call(self):
|
||||||
|
|
Loading…
Reference in New Issue