seitime-frappe/frappe/tests/test_async.py
2015-08-14 15:08:40 +05:30

17 lines
477 B
Python

# -*- coding: utf-8 -*-
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# MIT License. See license.txt
from __future__ import unicode_literals
import unittest
import frappe
from frappe.tasks import run_async_task
class TestAsync(unittest.TestCase):
def test_response(self):
result = run_async_task.delay(frappe.local.site, 'Administrator', 'async_ping',
frappe._dict())
result = result.get()
self.assertEquals(result.get("message"), "pong")