Commit b347ee10d46dfaac12982aeef6cff6aef370d489

Authored by 季培红
2 parents 6a893254 9b332522

Merge branch 'feature/jipeihong' into 'master'

add requirements.txt



See merge request !14
atdd/MobilePost.py
... ... @@ -23,8 +23,7 @@ class MobilePost(ATDDCase):
23 23  
24 24  
25 25 # 手机端接口模板
26   - def MobilePost(self, interfaceUrl, data=None, **options):
27   -
  26 + def mobile_post(self, interfaceUrl, data=None, **options):
28 27 self.interfaceUrl = interfaceUrl
29 28 self.data = data
30 29  
... ... @@ -36,7 +35,7 @@ class MobilePost(ATDDCase):
36 35 self.assertEquals(0, errcode)
37 36 return result
38 37  
39   - # 端接口模板-异常判断
  38 + # 手机端接口模板-异常判断
40 39 def MobilePostAbnormal(self, interfaceUrl, data=None, code=None, **options):
41 40 self.interfaceUrl = interfaceUrl
42 41 self.data = data
... ...
requirements.txt 0 → 100644
  1 +argh==0.26.2
  2 +asn1crypto==0.22.0
  3 +certifi==2017.4.17
  4 +cffi==1.10.0
  5 +chardet==3.0.4
  6 +colorama==0.3.9
  7 +coverage==4.4.1
  8 +cryptography==1.9
  9 +idna==2.5
  10 +ndg-httpsclient==0.4.2
  11 +nose==1.3.7
  12 +nose2==0.6.5
  13 +pathtools==0.1.2
  14 +py==1.4.34
  15 +pyasn1==0.2.3
  16 +pycparser==2.18
  17 +pyOpenSSL==17.1.0
  18 +pytest==3.1.3
  19 +PyYAML==3.12
  20 +reload==0.9
  21 +requests==2.18.1
  22 +six==1.10.0
  23 +urllib3==1.21.1
  24 +watchdog==0.8.3
... ...
tests/Staff_Management/AdminSettings/test_jobSetting.py renamed to tests/Staff_Management/AdminSettings/Job_setting/test_jobSetting.py
tests/Staff_Management/AdminSettings/public_adminSettings.py renamed to tests/Staff_Management/AdminSettings/Public/public_adminSettings.py
tests/Staff_Management/AdminSettings/test_roleSetting.py renamed to tests/Staff_Management/AdminSettings/Role_setting/test_roleSetting.py
tests/Staff_Management/AdminSettings/Synchronous_address_book/test_synchronous.py 0 → 100644
tests/Staff_Management/Invite/test_Invitation_authority.py
1   -from atdd.PcPost import PcPost
2   -from tests.Staff_Management.AdminSettings.test_jobSetting import JobSetting
3   -from tests.Staff_Management.AdminSettings.test_roleSetting import RoleSetting
4 1 import random
5 2  
  3 +from AdminSettings.Job_setting.test_jobSetting import JobSetting
  4 +from AdminSettings.Role_setting.test_roleSetting import RoleSetting
  5 +from atdd.PcPost import PcPost
  6 +
  7 +
6 8 class InvitationAuth(PcPost):
7 9  
8 10 interfaceUrl = "/Public/Apicp/ChooseMem/ConfirmChoose"
... ...
tests/Staff_Management/MemberList/JobList/get_jobid.py
... ... @@ -17,7 +17,7 @@ class JobId(PcPost):
17 17 for i in range(len(resultlist)): # 通过序列索引进行遍历 len返回元素个数
18 18 jobId = result['result']['list'][i]['jobId'].split() # 切片取出元素
19 19 jobIdlist[len(jobIdlist):len(jobIdlist)] = jobId
20   - # print(jobIdlist)
  20 + print(jobIdlist)
21 21 return jobIdlist
22 22  
23 23 def test_get_1jobid(self):
... ...
tests/Staff_Management/MemberList/JobList/test_delete_job.py
... ... @@ -11,7 +11,9 @@ class DeleteJob(PcPost):
11 11  
12 12 # 删除岗位
13 13 def test_deletejob(self):
14   - jobId = JobId().test_get_1jobid()
  14 + IDjob = JobId()
  15 + IDjob.setUp()
  16 + jobId = IDjob.test_get_1jobid()
15 17 data = {
16 18 'jobId': jobId # 参数化
17 19 }
... ...
tests/Staff_Management/Organization/public_org.py
... ... @@ -7,6 +7,7 @@ class PulbicOrg(PcPost):
7 7  
8 8 # 获取顶级部门的ID
9 9 def get_top_org(self):
  10 + self.do_login(self.host, self.mobile, self.psw, self.domain)
10 11 url = "/Contact/Apicp/Department/List"
11 12 data = {
12 13 "_identifier": 'contact',
... ... @@ -18,6 +19,7 @@ class PulbicOrg(PcPost):
18 19  
19 20 # 查找某一个部门以及其子部门的dpId,以list格式返回
20 21 def get_all_dpId(self,dpParentId):
  22 + self.do_login(self.host, self.mobile, self.psw, self.domain)
21 23 data = {
22 24 "dpParentId":dpParentId
23 25 }
... ... @@ -32,6 +34,7 @@ class PulbicOrg(PcPost):
32 34  
33 35 # 获取组织下的人员总数
34 36 def get_org_user_total(self,dpParentId):
  37 + self.do_login(self.host, self.mobile, self.psw, self.domain)
35 38 data = {
36 39 "dpParentId": dpParentId
37 40 }
... ... @@ -41,6 +44,7 @@ class PulbicOrg(PcPost):
41 44  
42 45 # 随机取一个部门,返回部门ID
43 46 def get_random_dptId(self):
  47 + self.do_login(self.host, self.mobile, self.psw, self.domain)
44 48 top_Id = self.get_top_org()
45 49 dpId_all = self.get_all_dpId(top_Id) # 所有部门的dpId
46 50 x = random.randint(0, len(dpId_all) - 1) # 在所有部门中随机取一个部门
... ...
tests/Staff_Management/Organization/test_add_org.py
... ... @@ -34,6 +34,9 @@ class AddOrg(PcPost):
34 34 def test_add_mendian(self):
35 35 x = random.randint(0,1000)
36 36 top_dpId = PulbicOrg().get_top_org()
  37 + # publicOrg = PulbicOrg()
  38 + # publicOrg.setUp()
  39 + # top_dpId = publicOrg.get_top_org()
37 40 data = {
38 41 "department_id": None,
39 42 "parent_id": top_dpId, # 顶级部门
... ...
tests/Staff_Management/Organization/tets_edit_org.py
... ... @@ -11,7 +11,7 @@ class EditOrg(PcPost):
11 11 self.do_login(self.host, self.mobile, self.psw, self.domain)
12 12  
13 13 def test_edit_query(self):
14   - # 随机取一个部门ID
  14 + # 随机取一个部门ID,判断业务正确性
15 15 dptId = PulbicOrg().get_random_dptId()
16 16  
17 17 data = {
... ...