def test_view_common(self):
    self.view.assign_syntax('Packages/Tutkain/Clojure Common (Tutkain).sublime-syntax')
    self.set_view_content('(ns baz.quux) (defn x [y] y)')
    self.set_selections((0, 0))
    self.view.run_command('tutkain_evaluate', {'scope': 'view'})
    message = edn.read(self.server.backchannel.recv())
    id = message.get(edn.Keyword('id'))
    self.assertEquals({edn.Keyword('op'): edn.Keyword('load'), edn.Keyword('code'): base64.encode('(ns baz.quux) (defn x [y] y)'.encode('utf-8')), edn.Keyword('file'): None, edn.Keyword('id'): id}, message)
    response = edn.kwmap({'id': id, 'tag': edn.Keyword('ret'), 'val': "#'baz.quux/x"})
    self.server.backchannel.send(response)
def test_view_common(self):
    self.view.assign_syntax('Packages/Tutkain/Clojure Common (Tutkain).sublime-syntax')
    self.set_view_content('(ns baz.quux) (defn x [y] y)')
    self.set_selections((0, 0))
    self.view.run_command('tutkain_evaluate', {'scope': 'view'})
    message = edn.read(self.server.backchannel.recv())
    id = message.get(edn.Keyword('id'))
    self.assertEquals({edn.Keyword('op'): edn.Keyword('load'), edn.Keyword('code'): base64.encode('(ns baz.quux) (defn x [y] y)'.encode('utf-8')), edn.Keyword('file'): None, edn.Keyword('id'): id}, message)
    response = edn.kwmap({'id': id, 'tag': edn.Keyword('ret'), 'val': "#'baz.quux/x"})
    self.server.backchannel.send(response)