def test_created(self): self.request_login(self.account.email) with self.check_delta(PostponedTaskPrototype._db_count, 1): response = self.post_ajax_json(logic.get_card_url()) task = PostponedTaskPrototype._db_get_object(0) self.check_ajax_processing(response, task.status_url)
def test_created(self): self.request_login(self.account.email) with self.check_delta(common_postponed_tasks.PostponedTaskPrototype._db_count, 1): response = self.post_ajax_json(logic.get_card_url()) task = common_postponed_tasks.PostponedTaskPrototype._db_get_object(0) self.check_ajax_processing(response, task.status_url)
def test_unlogined(self): self.check_ajax_error(self.post_ajax_json(logic.get_card_url()), 'common.login_required')
def test_unlogined(self): self.check_ajax_error(self.post_ajax_json(logic.get_card_url()), 'common.login_required')
def get_card_url(): return jinja2.Markup(logic.get_card_url())