Anonymous avatar Anonymous committed 650c6aa

Added new case in testObjectMapping.py

Comments (0)

Files changed (1)

test/testObjectMapping.py

         return "index for dir1"
     index.exposed = True
     def default(self, *params):
-        return repr(params)
+        return "default for dir1, param is:" + repr(params)
     default.exposed = True
 class Dir2:
     def index(self):
     def method(self):
         return "method for dir2"
     method.exposed = True
+class Dir3:
+    def default(self):
+        return "default for dir3, not exposed"
+class Dir4:
+    def index(self):
+        return "index for dir4, not exposed"
 cpg.root = Root()
 cpg.root.dir1 = Dir1()
 cpg.root.dir1.dir2 = Dir2()
+cpg.root.dir1.dir2.dir3 = Dir3()
+cpg.root.dir1.dir2.dir3.dir4 = Dir4()
 cpg.server.start(configFile = 'testsite.cfg')
 """
 
     ("/dir1/dir2/", "cpg.response.body == 'index for dir2, path is:/dir1/dir2/'"),
     ("/dir1/dir2", "cpg.response.headerMap['Status'] == 302" +
         " and cpg.response.headerMap['Location'] == 'http://127.0.0.1/dir1/dir2/'"),
+    ("/dir1/dir2/dir3/dir4/index", '''cpg.response.body == "default for dir1, param is:('dir2', 'dir3', 'dir4', 'index')"'''),
 ]
 
 def test(infoMap, failedList, skippedList):
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.