示例#1
0
文件: game.py 项目: Labo-Web/Labo-Web
class MapTestSuite(unittest.TestCase):
    
    def setUp(self):
        self.map = Map(id=0)
        self.block = Block(BlockType.GRASS, Position(10, 20))
    
    def test_dump_map(self):
#        print self.map
        dump = self.map.json_encode()
        print dump
        assert json.loads(dump)
        
    def test_dump_block(self):
        print self.block.json_encode()
示例#2
0
文件: game.py 项目: Labo-Web/Labo-Web
 def setUp(self):
     self.map = Map(id=0)
     self.block = Block(BlockType.GRASS, Position(10, 20))