def setUp(self):
     self.config = systemSetting()  # 系統參數
     self.__http = HttpRequest()
     self.user = User(self.__http)
     self.AnnouncementManagement = PortalManagement.AnnouncementManagement(self.__http)
     self.PortalManagement = PortalManagement(self.__http)
     self.user.login()
Пример #2
0
 def getWebsiteId(cls):
     cls.config = systemSetting()
     cls.__http = HttpRequest()
     cls.user = User(cls.__http)
     cls.AnnouncementManagement = PortalManagement.AnnouncementManagement(
         cls.__http)
     cls.PortalManagement = PortalManagement(cls.__http)
     cls.user.login()
     response_data = cls.PortalManagement.getWebsiteList({})
     for i in range(len(response_data[1]['ReturnObject'])):
         if cls.config.siteName_config(
         ) == response_data[1]['ReturnObject'][i]['Name']:
             Id = response_data[1]['ReturnObject'][i]['Id']
             return Id