Freebox thin client
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

26 lines
586 B

  1. #!/usr/bin/env python3
  2. import os
  3. import time
  4. import sys
  5. import requests
  6. import pytest
  7. from mock import patch, MagicMock
  8. from pyfbx import Fbx
  9. def test_fbx_hardcoded_url():
  10. f = Fbx(url="http://12.34.56.78/api/v4")
  11. f = Fbx(url="12.34.56.78/api/v4")
  12. @pytest.mark.skipif('TEST_SKIP_LOCAL' in os.environ, reason="No freebox")
  13. def test_fbx_mdns():
  14. f = Fbx()
  15. assert isinstance(f, Fbx)
  16. with patch('pyfbx.mdns.FbxMDNS.search', return_value=None):
  17. f = Fbx()
  18. f = Fbx(url="http://192.168.1.254")
  19. f = Fbx(nomdns=True)
  20. f = Fbx(session=requests.Session())