# HG changeset patch # User Neil Muller # Date 1378910141 -7200 # Node ID 7ad528f7d17ca131f9fd6c1f2a0e5fbe17edd087 # Parent f3e79d6225b53b7ac46a6979cb8131ba20e4c043 Flesh out mock objects for puzzle tests diff -r f3e79d6225b5 -r 7ad528f7d17c nagslang/tests/test_puzzle.py --- a/nagslang/tests/test_puzzle.py Wed Sep 11 16:35:18 2013 +0200 +++ b/nagslang/tests/test_puzzle.py Wed Sep 11 16:35:41 2013 +0200 @@ -4,9 +4,15 @@ from nagslang import puzzle +class FakeBody(object): + def __init__(self): + self.position = (0, 0) + + class FakeShape(object): def __init__(self, collision_type=COLLISION_TYPE_OTHER): self.collision_type = collision_type + self.body = FakeBody() class FakeSpace(object): @@ -16,6 +22,14 @@ def shape_query(self, shape): return self._shapes + def _get_shapes(self): + return self._shapes + + def point_query(self, position): + return [] + + shapes = property(_get_shapes) + class FakeGameObject(object): def __init__(self, shape, space):