Bug 1426082 - Remove superfluous transport tests. r=whimboo

This drops the tests for Marionette protocol level 2.  Protocol levels
below 2 were removed some time ago:

	https://bugzilla.mozilla.org/show_bug.cgi?id=1409030

MozReview-Commit-ID: GsrdeldnoNH

--HG--
extra : rebase_source : 522d7a9c71545693ca2b662d0a6c715df0f2cd24
This commit is contained in:
Andreas Tolfsen 2018-02-26 20:07:59 +00:00
parent 3a1b1e0078
commit ac2756c68e

View File

@ -6,12 +6,7 @@ from __future__ import absolute_import
import json
from marionette_driver.transport import (
Command,
Proto2Command,
Proto2Response,
Response,
)
from marionette_driver.transport import Command, Response
from marionette_harness import MarionetteTestCase
@ -116,46 +111,3 @@ class TestResponse(MessageTestCase):
self.assertEquals(msg[1], resp.id)
self.assertEquals(msg[2], resp.error)
self.assertEquals(msg[3], resp.result)
class TestProto2Command(MessageTestCase):
def create(self, name="name", params="params"):
return Proto2Command(name, params)
def test_initialise(self):
cmd = self.create()
self.assert_attr(cmd, "id")
self.assert_attr(cmd, "name")
self.assert_attr(cmd, "params")
self.assertEqual(None, cmd.id)
self.assertEqual("name", cmd.name)
self.assertEqual("params", cmd.params)
def test_from_data_unknown(self):
with self.assertRaises(ValueError):
cmd = Proto2Command.from_data({})
class TestProto2Response(MessageTestCase):
def create(self, error="error", result="result"):
return Proto2Response(error, result)
def test_initialise(self):
resp = self.create()
self.assert_attr(resp, "id")
self.assert_attr(resp, "error")
self.assert_attr(resp, "result")
self.assertEqual(None, resp.id)
self.assertEqual("error", resp.error)
self.assertEqual("result", resp.result)
def test_from_data_error(self):
data = {"error": "error"}
resp = Proto2Response.from_data(data)
self.assertEqual(data, resp.error)
self.assertEqual(None, resp.result)
def test_from_data_result(self):
resp = Proto2Response.from_data("result")
self.assertEqual(None, resp.error)
self.assertEqual("result", resp.result)