Changeset 685:7ad528f7d17c for nagslang


Ignore:
Timestamp:
Sep 11, 2013, 2:35:41 PM (7 years ago)
Author:
Neil Muller <drnlmuller@…>
Branch:
default
Message:

Flesh out mock objects for puzzle tests

File:
1 edited

Legend:

Unmodified
Added
Removed
  • nagslang/tests/test_puzzle.py

    r201 r685  
    55
    66
     7class FakeBody(object):
     8    def __init__(self):
     9        self.position = (0, 0)
     10
     11
    712class FakeShape(object):
    813    def __init__(self, collision_type=COLLISION_TYPE_OTHER):
    914        self.collision_type = collision_type
     15        self.body = FakeBody()
    1016
    1117
     
    1622    def shape_query(self, shape):
    1723        return self._shapes
     24
     25    def _get_shapes(self):
     26        return self._shapes
     27
     28    def point_query(self, position):
     29        return []
     30
     31    shapes = property(_get_shapes)
    1832
    1933
Note: See TracChangeset for help on using the changeset viewer.