def test_async_run_tests_ns(self):
    code = '\n        (ns my.app\n          (:require [clojure.test :refer [deftest is]]))\n\n        (deftest my-test\n          (is (= 2 (+ 1 1))))\n        '
    self.set_view_content(code)
    self.view.run_command('tutkain_run_tests', {'scope': 'ns'})
    message = edn.read(self.server.backchannel.recv())
    id = message.get(edn.Keyword('id'))
    self.assertEquals(edn.kwmap({'op': edn.Keyword('test'), 'file': None, 'ns': 'my.app', 'vars': [], 'code': base64.encode(code.encode('utf-8')), 'id': id}), message)
    response = edn.kwmap({'id': id, 'tag': edn.Keyword('ret'), 'val': '{:test 1, :pass 1, :fail 0, :error 0, :assert 1, :type :summary}', 'pass': [edn.kwmap({'type': edn.Keyword('pass'), 'line': 5, 'var-meta': edn.kwmap({'line': 4, 'column': 1, 'file': 'NO_SOURCE_FILE', 'name': edn.Symbol('my-test'), 'ns': 'my.app'})})], 'fail': [], 'error': []})
    self.server.backchannel.send(response)
    (yield unittesting.AWAIT_WORKER)
    self.assertEquals([sublime.Region(78, 78)], test.regions(self.view, 'passes'))
    self.assertFalse(test.regions(self.view, 'fail'))
    self.assertFalse(test.regions(self.view, 'error'))
def test_async_run_tests_ns(self):
    code = '\n        (ns my.app\n          (:require [clojure.test :refer [deftest is]]))\n\n        (deftest my-test\n          (is (= 2 (+ 1 1))))\n        '
    self.set_view_content(code)
    self.view.run_command('tutkain_run_tests', {'scope': 'ns'})
    message = edn.read(self.server.backchannel.recv())
    id = message.get(edn.Keyword('id'))
    self.assertEquals(edn.kwmap({'op': edn.Keyword('test'), 'file': None, 'ns': 'my.app', 'vars': [], 'code': base64.encode(code.encode('utf-8')), 'id': id}), message)
    response = edn.kwmap({'id': id, 'tag': edn.Keyword('ret'), 'val': '{:test 1, :pass 1, :fail 0, :error 0, :assert 1, :type :summary}', 'pass': [edn.kwmap({'type': edn.Keyword('pass'), 'line': 5, 'var-meta': edn.kwmap({'line': 4, 'column': 1, 'file': 'NO_SOURCE_FILE', 'name': edn.Symbol('my-test'), 'ns': 'my.app'})})], 'fail': [], 'error': []})
    self.server.backchannel.send(response)
    (yield unittesting.AWAIT_WORKER)
    self.assertEquals([sublime.Region(78, 78)], test.regions(self.view, 'passes'))
    self.assertFalse(test.regions(self.view, 'fail'))
    self.assertFalse(test.regions(self.view, 'error'))