def smokeTestModule():
    from simplerpc.context.SimpleRpcContext import SimpleRpcContext
    from simplerpc.common.path import joinPath
    context = SimpleRpcContext('test exposed')
    tec = TestExposedModule(context)
    file_path = joinPath(tec._getProjectPath(), 'exposed_api/images/ImagesBrowser.py')
    tec.testModule(file_path)
 def getJsUnittest(self, class_):
     #solve to the tested class if not given
     if issubclass(class_, TestCase):
         tested_class = self.getTestedFromTester(class_)
     else:
         tested_class = class_
     module_name = self.__getClassModuleName(tested_class)
     if os.path.isabs(self.context.js_path):
         js_prefix = self.context.js_path
     else:
         js_prefix = joinPath(self._getProjectPath(), self.context.js_path)
     #create path and add unittests folder inside the js folder
     test_path = joinPath(js_prefix, 'unittests', module_name.split('.'))
     #add extension
     test_path += '.js'
     return test_path
 def _getRepoPath(self, templates_set):
     return joinPath(os.path.dirname(__file__), templates_set)
Example #4
0
 def _getJsRpcFile(self, js_rpc_file):
     if not js_rpc_file:
         js_rpc_file = joinPath(self._getProjectJsPath(), self.context.js_rpc_file)
     elif not os.path.isabs(js_rpc_file):
         js_rpc_file = joinPath(self._getProjectJsPath(), js_rpc_file)
     return js_rpc_file
Example #5
0
 def _getProjectJsPath(self):
     if os.path.isabs(self.context.js_path):
         js_root = self.context.js_path
     else:
         js_root = joinPath(self._getProjectPath(), self.context.js_path)
     return js_root