ipc_test.py 571 B

1234567891011121314151617181920212223
  1. #!/usr/bin/env python
  2. # -*- coding:utf-8 -*-
  3. import unittest
  4. from plugins import ipc
  5. class IPCTest(unittest.TestCase):
  6. def test_snapshot(self):
  7. host = 'ipc.pc'
  8. port = 2000
  9. user = 'admin'
  10. password = 'admin'
  11. image_dir = '../test/image'
  12. wsdl_dir = '../resource/wsdl'
  13. camera = ipc.IPC(host=host, port=port, user=user, password=password,
  14. image_dir=image_dir, wsdl_dir=wsdl_dir)
  15. snapshot = camera.snapshot()
  16. print(snapshot)
  17. if __name__ == '__main__':
  18. unittest.main()