Esempio n. 1
0
class TestBravoProtocol(TestCase):

    def setUp(self):
        self.bcp = BravoConfigParser()
        self.p = BravoProtocol(self.bcp, "unittest")

    def tearDown(self):
        self.p.setTimeout(None)

    def test_trivial(self):
        pass

    def test_entities_near_unloaded_chunk(self):
        """
        entities_near() shouldn't raise a fatal KeyError when a nearby chunk
        isn't loaded.

        Reported by brachiel on IRC.
        """

        list(self.p.entities_near(2))

    def test_disable_chunk_invalid(self):
        """
        If invalid data is sent to disable_chunk(), no error should happen.
        """

        self.p.disable_chunk(0, 0)
Esempio n. 2
0
class TestBravoProtocol(TestCase):
    def setUp(self):
        self.bcp = BravoConfigParser()
        self.p = BravoProtocol(self.bcp, "unittest")

    def tearDown(self):
        self.p.setTimeout(None)

    def test_trivial(self):
        pass

    def test_entities_near_unloaded_chunk(self):
        """
        entities_near() shouldn't raise a fatal KeyError when a nearby chunk
        isn't loaded.

        Reported by brachiel on IRC.
        """

        list(self.p.entities_near(2))

    def test_disable_chunk_invalid(self):
        """
        If invalid data is sent to disable_chunk(), no error should happen.
        """

        self.p.disable_chunk(0, 0)