Browse Source

tests/test_middleware.py: New file

Tom Low-Shang 6 years ago
parent
commit
e6bece00d9
1 changed files with 10 additions and 0 deletions
  1. 10 0
      tests/test_middleware.py

+ 10 - 0
tests/test_middleware.py View File

@@ -0,0 +1,10 @@
1
+from synergine2.config import Config
2
+from synergine2_cocos2d.middleware import MapMiddleware
3
+
4
+class TestMapMiddleware:
5
+    def test_get_map_file_path(self):
6
+        test = MapMiddleware(Config(), 'map/003')
7
+        assert test.get_map_file_path() == 'map/003/003.tmx'
8
+        test = MapMiddleware(Config(), 'map/003/')
9
+        assert test.get_map_file_path() == 'map/003/003.tmx'
10
+