test_15_koc_live.py 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. """KOC 模块 — 真实联调(API-17/18 外部联系人)"""
  2. import pytest
  3. pytestmark = [pytest.mark.integration, pytest.mark.qiwei_live]
  4. def test_live_contacts_sync(api, live_guid):
  5. data = api.assert_success(
  6. api.post(
  7. "/contacts/sync",
  8. json={"guid": live_guid, "currentSeq": 0, "limit": 20},
  9. )
  10. )
  11. assert "contacts" in data
  12. assert "hasMore" in data
  13. assert isinstance(data["contacts"], list)
  14. def test_live_contacts_list_after_sync(api, live_guid):
  15. api.assert_success(
  16. api.post("/contacts/sync", json={"guid": live_guid, "currentSeq": 0, "limit": 10})
  17. )
  18. listed = api.assert_success(api.get("/contacts"))
  19. assert isinstance(listed, list)
  20. def test_live_proxy_wx_contact_list(api, live_guid):
  21. data = api.assert_success(
  22. api.post(
  23. "/qiwei/proxy",
  24. json={
  25. "method": "/contact/getWxContactList",
  26. "params": {"guid": live_guid, "currentSeq": 0, "limit": 10, "bizType": 1},
  27. },
  28. )
  29. )
  30. assert isinstance(data, dict)