示例#1
0
 def add(self):
     """ generated source for method add """
     query = CreateMasterFileQuery(self.realpath, self.getName(), self.myProject.getProjectName(), self.platformId, self.myProject.getLanguageId())
     query.setBasicAuth(self.myProject.getUsername(), self.myProject.getPassword())
     try:
         query.doQuery()
     except Exception as e:
         print traceback.format_exc()
         raise GLException("Unable to create master file to Get Localization: " + str(e))
示例#2
0
 def test(self):
     """ generated source for method test """
     file_ = "testdata/master-file.properties"
     print "Loading test file:" + file_
     query = CreateMasterFileQuery(file_, "javatestsuite", "javaproperties",
                                   "en")
     query.setBasicAuth("javatestuser", "asdf1234")
     try:
         query.doQuery()
     except Exception as e:
         self.fail("Exception" + str(e))
 def add(self):
     """ generated source for method add """
     query = CreateMasterFileQuery(self.realpath, self.getName(), self.myProject.getProjectName(), self.platformId, self.myProject.getLanguageId())
     query.setBasicAuth(self.myProject.getUsername(), self.myProject.getPassword())
     try:
         query.doQuery()
     except Exception as e:
         if e.statusCode == 401:
             raise GLException("Username or password incorrect or you might not have required acl to this project.")
         else:
             raise GLException("Unable to add new master file: " + str(e))