diff --git a/tests/conftest.py b/tests/conftest.py index 6220bb5..7af0dd1 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -1,7 +1,7 @@ """Provide some base configurations for tests.""" import phpypam import pytest -import py.path +import py.path # pyright: ignore reportMissingImports=false import yaml from urllib.parse import urlparse, urlunparse diff --git a/tests/fixtures/test_address_not_found.yml b/tests/fixtures/test_address_not_found.yml deleted file mode 100644 index 1be6d8a..0000000 --- a/tests/fixtures/test_address_not_found.yml +++ /dev/null @@ -1,103 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' - User-Agent: - - python-requests/2.24.0 - method: POST - uri: https://ipam.example.org/api/ansible/user - response: - body: - string: !!binary | - H4sIAAAAAAAAAw3NTQqDMBAG0KuUb53IZCpCZt/SXaF/CzciySxsUYuJVBDvXg/weCvCGBXCRAZp - DkFTguRpVoPY5hayIo8fHSBIL+tPzfXyvoVnPZw12uV3rx4eBrp8u0l3CSYm65yl8sAkRy9cYjPI - Xb8vVJDb/o6954ZzAAAA - headers: - Cache-Control: - - no-cache - Connection: - - Keep-Alive - Content-Encoding: - - gzip - Content-Type: - - application/json; charset=utf-8 - Date: - - Wed, 04 Nov 2020 13:39:24 GMT - Expires: - - Thu, 19 Nov 1981 08:52:00 GMT - Keep-Alive: - - timeout=5, max=100 - Pragma: - - no-cache - Server: - - Apache/2.4.37 (centos) OpenSSL/1.1.1c - Set-Cookie: - - phpipam=rtcrr3al96v1m7oro2vnsc0lc4; expires=Thu, 05-Nov-2020 13:39:24 GMT; - Max-Age=86400; path=/; HttpOnly - Transfer-Encoding: - - chunked - Vary: - - Accept-Encoding - X-Powered-By: - - PHP/7.2.24 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python-requests/2.24.0 - method: GET - uri: https://ipam.example.org/api/ansible/addresses/search/10.10.0.4 - response: - body: - string: !!binary | - H4sIAAAAAAAAA6tWSs5PSVWyMjIw0FEqLk1OTi0uVrJKS8wpTtVRygVyEtOBskqOKSlFQI5CXn6J - Qlp+aV6Kko5SSWYuUMpAz8DAtBYAByXdEUcAAAA= - headers: - Cache-Control: - - no-cache - Connection: - - Keep-Alive - Content-Encoding: - - gzip - Content-Type: - - application/json; charset=utf-8 - Date: - - Wed, 04 Nov 2020 13:39:24 GMT - Expires: - - Thu, 19 Nov 1981 08:52:00 GMT - Keep-Alive: - - timeout=5, max=100 - Pragma: - - no-cache - Server: - - Apache/2.4.37 (centos) OpenSSL/1.1.1c - Set-Cookie: - - phpipam=vl2d6ijho4ddb26e964bhfd8gn; expires=Thu, 05-Nov-2020 13:39:24 GMT; - Max-Age=86400; path=/; HttpOnly - Transfer-Encoding: - - chunked - Vary: - - Accept-Encoding - X-Powered-By: - - PHP/7.2.24 - status: - code: 200 - message: OK -version: 1 diff --git a/tests/fixtures/test_connection_failure.yml b/tests/fixtures/test_connection_failure.yml deleted file mode 100644 index 76bc717..0000000 --- a/tests/fixtures/test_connection_failure.yml +++ /dev/null @@ -1,100 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' - User-Agent: - - python-requests/2.24.0 - method: POST - uri: https://ipam.example.org/api/ansible/user - response: - body: - string: !!binary | - H4sIAAAAAAAAA6tWSs5PSVWyMjUw0FEqLk1OTi0uVrJKS8wpTtVRygVyEtOBskqeeWWJOZkpCqXF - qUV5ibmpCvlFCgWJxcXl+UUpSjpKJZm5QFUGegYG5rUApmB0WFIAAAA= - headers: - Cache-Control: - - no-cache - Connection: - - close - Content-Encoding: - - gzip - Content-Type: - - application/json; charset=utf-8 - Date: - - Wed, 04 Nov 2020 13:39:17 GMT - Expires: - - Thu, 19 Nov 1981 08:52:00 GMT - Pragma: - - no-cache - Server: - - Apache/2.4.37 (centos) OpenSSL/1.1.1c - Set-Cookie: - - phpipam=ushkqmr1t9bhu636sohm3qjdmg; expires=Thu, 05-Nov-2020 13:39:17 GMT; - Max-Age=86400; path=/; HttpOnly - Transfer-Encoding: - - chunked - Vary: - - Accept-Encoding - X-Powered-By: - - PHP/7.2.24 - status: - code: 500 - message: Internal Server Error -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' - User-Agent: - - python-requests/2.24.0 - method: POST - uri: https://ipam.example.org/api/ansible/user - response: - body: - string: !!binary | - H4sIAAAAAAAAA6tWSs5PSVWyMjUw0FEqLk1OTi0uVrJKS8wpTtVRygVyEtOBskqeeWWJOZkpCqXF - qUV5ibmpCvlFCgWJxcXl+UUpSjpKJZm5QFUGegYGprUAJAJCalIAAAA= - headers: - Cache-Control: - - no-cache - Connection: - - close - Content-Encoding: - - gzip - Content-Type: - - application/json; charset=utf-8 - Date: - - Wed, 04 Nov 2020 13:39:17 GMT - Expires: - - Thu, 19 Nov 1981 08:52:00 GMT - Pragma: - - no-cache - Server: - - Apache/2.4.37 (centos) OpenSSL/1.1.1c - Set-Cookie: - - phpipam=tpi619vqreehocgqhe8b0fe9fe; expires=Thu, 05-Nov-2020 13:39:17 GMT; - Max-Age=86400; path=/; HttpOnly - Transfer-Encoding: - - chunked - Vary: - - Accept-Encoding - X-Powered-By: - - PHP/7.2.24 - status: - code: 500 - message: Internal Server Error -version: 1 diff --git a/tests/fixtures/test_connection_success.yml b/tests/fixtures/test_connection_success.yml deleted file mode 100644 index 3658383..0000000 --- a/tests/fixtures/test_connection_success.yml +++ /dev/null @@ -1,54 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' - User-Agent: - - python-requests/2.24.0 - method: POST - uri: https://ipam.example.org/api/ansible/user - response: - body: - string: !!binary | - H4sIAAAAAAAAAw3NSwrCMBQF0K3IHSdyE8WSN1ecCf4GTqQkb1DFVpoUC6V7tws4nAmxSwrxpEEe - YtScIaUf1CDVpYZMKN1bWwjy3Yb983R8nePt0R402fF32V0DDHT8Nr0uEp6e1jnL7cpTNkFchdmg - NJ9l4Zqs5j/I4HhEdAAAAA== - headers: - Cache-Control: - - no-cache - Connection: - - Keep-Alive - Content-Encoding: - - gzip - Content-Type: - - application/json; charset=utf-8 - Date: - - Wed, 04 Nov 2020 13:39:17 GMT - Expires: - - Thu, 19 Nov 1981 08:52:00 GMT - Keep-Alive: - - timeout=5, max=100 - Pragma: - - no-cache - Server: - - Apache/2.4.37 (centos) OpenSSL/1.1.1c - Set-Cookie: - - phpipam=1a4mihglov6rns984mldh8nhdi; expires=Thu, 05-Nov-2020 13:39:17 GMT; - Max-Age=86400; path=/; HttpOnly - Transfer-Encoding: - - chunked - Vary: - - Accept-Encoding - X-Powered-By: - - PHP/7.2.24 - status: - code: 200 - message: OK -version: 1 diff --git a/tests/fixtures/test_controllers.yml b/tests/fixtures/test_controllers.yml deleted file mode 100644 index 2b5564f..0000000 --- a/tests/fixtures/test_controllers.yml +++ /dev/null @@ -1,108 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' - User-Agent: - - python-requests/2.24.0 - method: POST - uri: https://ipam.example.org/api/ansible/user - response: - body: - string: !!binary | - H4sIAAAAAAAAAw3NSwrCMBQF0K3IHSdyE0XMmyvOBH8DJ1KSN6jFVpoUC6V7tws4nAmxSwrxpEEe - YtScIaUf1CBVpYJMKF2jLQT5YcPhdT69L/H+bI+a7Pi77m4BBjp+614XCU9P65zlduUpmyBuj9mg - 1J9l4ZoM8x+T/nkcdAAAAA== - headers: - Cache-Control: - - no-cache - Connection: - - Keep-Alive - Content-Encoding: - - gzip - Content-Type: - - application/json; charset=utf-8 - Date: - - Wed, 04 Nov 2020 13:39:18 GMT - Expires: - - Thu, 19 Nov 1981 08:52:00 GMT - Keep-Alive: - - timeout=5, max=100 - Pragma: - - no-cache - Server: - - Apache/2.4.37 (centos) OpenSSL/1.1.1c - Set-Cookie: - - phpipam=9q9sne55trqrr44rjm7qg0c9p8; expires=Thu, 05-Nov-2020 13:39:18 GMT; - Max-Age=86400; path=/; HttpOnly - Transfer-Encoding: - - chunked - Vary: - - Accept-Encoding - X-Powered-By: - - PHP/7.2.24 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' - User-Agent: - - python-requests/2.24.0 - method: OPTIONS - uri: https://ipam.example.org/api/ansible// - response: - body: - string: !!binary | - H4sIAAAAAAAAA42SsXLDIAyG30UzV3Pt5q1P0aHuoIDccsGQE3IWn9892HV9IXfBXRik7xP8wAQm - WoL2VWsFaTSGUoJWeCQFFgWhneBCPLiUXAy5BR/shEBlLwhH74lz9XMCJp+7iYysoIIfpj5XugYv - Li8huZOnrvkjugZmtWvjKZDUrF+gkPro7bL7U2kDCgmt5ZyRKtqOFOLVYy3W0i557ms49wUdcKBE - fK3mkRh9PtQdW16iwfD+TaF2j9uIBcUVLSb4aPDg+bYBO1n4jOZ87K7UQ3r5R2opnLV8aMH8NSsQ - N+Q/rl+0fptvrSqZ5PICAAA= - headers: - Cache-Control: - - no-cache - Connection: - - Keep-Alive - Content-Encoding: - - gzip - Content-Type: - - application/json; charset=utf-8 - Date: - - Wed, 04 Nov 2020 13:39:18 GMT - Expires: - - Thu, 19 Nov 1981 08:52:00 GMT - Keep-Alive: - - timeout=5, max=100 - Pragma: - - no-cache - Server: - - Apache/2.4.37 (centos) OpenSSL/1.1.1c - Set-Cookie: - - phpipam=lj6n8k9rom3l1ee592u2mqk68g; expires=Thu, 05-Nov-2020 13:39:18 GMT; - Max-Age=86400; path=/; HttpOnly - Transfer-Encoding: - - chunked - Vary: - - Accept-Encoding - X-Powered-By: - - PHP/7.2.24 - status: - code: 200 - message: OK -version: 1 diff --git a/tests/fixtures/test_create_nameserver.yml b/tests/fixtures/test_create_nameserver.yml deleted file mode 100644 index 24253e2..0000000 --- a/tests/fixtures/test_create_nameserver.yml +++ /dev/null @@ -1,156 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python-requests/2.24.0 - method: GET - uri: https://ipam.example.org/api/ansible/tools/nameservers/?filter_by=name&filter_value=my+dns - response: - body: - string: !!binary | - H4sIAAAAAAAAA6tWSs5PSVWyMjEw0VEqLk1OTi0uVrJKS8wpTtVRygVyEtOBskp++QpFqcWlOSXF - ChppmTklqUUKiQUFOZmpKZpKOkolmblARQZ6BgYmtQBnBaDXUQAAAA== - headers: - Cache-Control: - - no-cache - Connection: - - Keep-Alive - Content-Encoding: - - gzip - Content-Type: - - application/json; charset=utf-8 - Date: - - Wed, 04 Nov 2020 13:39:18 GMT - Expires: - - Thu, 19 Nov 1981 08:52:00 GMT - Keep-Alive: - - timeout=5, max=100 - Pragma: - - no-cache - Server: - - Apache/2.4.37 (centos) OpenSSL/1.1.1c - Set-Cookie: - - phpipam=gdlp24pbt511hh0qpvrl0qr866; expires=Thu, 05-Nov-2020 13:39:18 GMT; - Max-Age=86400; path=/; HttpOnly - Transfer-Encoding: - - chunked - Vary: - - Accept-Encoding - X-Powered-By: - - PHP/7.2.24 - status: - code: 404 - message: Not Found -- request: - body: name=my+dns&namesrv1=127.0.01&permissions=1 - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '43' - Content-Type: - - application/x-www-form-urlencoded - User-Agent: - - python-requests/2.24.0 - method: POST - uri: https://ipam.example.org/api/ansible/tools/nameservers - response: - body: - string: !!binary | - H4sIAAAAAAAAAw3MMQ6AIBBE0auQqYkBCwpug8sUmiAJu9gY7y7dL17+C+mVyHuIHjpFqIpsY9Lj - rMhIER61WFl9l0bleDjU9eOimJPBYqzL2NnWJ2whpO8HeBwzH1YAAAA= - headers: - Cache-Control: - - no-cache - Connection: - - Keep-Alive - Content-Encoding: - - gzip - Content-Type: - - application/json; charset=utf-8 - Date: - - Wed, 04 Nov 2020 13:39:18 GMT - Expires: - - Thu, 19 Nov 1981 08:52:00 GMT - Keep-Alive: - - timeout=5, max=100 - Location: - - /api/ansible/tools/nameservers/61/ - Pragma: - - no-cache - Server: - - Apache/2.4.37 (centos) OpenSSL/1.1.1c - Set-Cookie: - - phpipam=73q0lsgbjds8kvj38do201ivss; expires=Thu, 05-Nov-2020 13:39:18 GMT; - Max-Age=86400; path=/; HttpOnly - Transfer-Encoding: - - chunked - Vary: - - Accept-Encoding - X-Powered-By: - - PHP/7.2.24 - status: - code: 201 - message: Created -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python-requests/2.24.0 - method: GET - uri: https://ipam.example.org/api/ansible/tools/nameservers/?filter_by=name&filter_value=my+dns - response: - body: - string: !!binary | - H4sIAAAAAAAAAy3MwQrCMBCE4VeROYeSFFHI2bcQDyG7h4UmLdmtIKXvboIe5+djDuSVGHH23kH3 - nFkV0drODpQsIT4PCCHiFuBQU+kY5XOhqv+t7R16C/N98pMfilhzk81krYh1XxaHjVsR1V502I6Y - xB7J+CfOl4PJOO8f/np+ARgWkdGYAAAA - headers: - Cache-Control: - - no-cache - Connection: - - Keep-Alive - Content-Encoding: - - gzip - Content-Type: - - application/json; charset=utf-8 - Date: - - Wed, 04 Nov 2020 13:39:18 GMT - Expires: - - Thu, 19 Nov 1981 08:52:00 GMT - Keep-Alive: - - timeout=5, max=100 - Pragma: - - no-cache - Server: - - Apache/2.4.37 (centos) OpenSSL/1.1.1c - Set-Cookie: - - phpipam=cqqbcpi64j5qih7h3092jvs6a4; expires=Thu, 05-Nov-2020 13:39:18 GMT; - Max-Age=86400; path=/; HttpOnly - Transfer-Encoding: - - chunked - Vary: - - Accept-Encoding - X-Powered-By: - - PHP/7.2.24 - status: - code: 200 - message: OK -version: 1 diff --git a/tests/fixtures/test_create_section.yml b/tests/fixtures/test_create_section.yml deleted file mode 100644 index cf25111..0000000 --- a/tests/fixtures/test_create_section.yml +++ /dev/null @@ -1,157 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python-requests/2.24.0 - method: GET - uri: https://ipam.example.org/api/ansible/sections/foobar - response: - body: - string: !!binary | - H4sIAAAAAAAAA6tWSs5PSVWyMjEw0VEqLk1OTi0uVrJKS8wpTtVRygVyEtOBskp++SUKbvmleSlK - OkolmblAIQM9AwPjWgChqv3nPwAAAA== - headers: - Cache-Control: - - no-cache - Connection: - - Keep-Alive - Content-Encoding: - - gzip - Content-Type: - - application/json; charset=utf-8 - Date: - - Wed, 04 Nov 2020 13:39:20 GMT - Expires: - - Thu, 19 Nov 1981 08:52:00 GMT - Keep-Alive: - - timeout=5, max=100 - Pragma: - - no-cache - Server: - - Apache/2.4.37 (centos) OpenSSL/1.1.1c - Set-Cookie: - - phpipam=u972h9e9ibpvh8qd1vc9sfisk3; expires=Thu, 05-Nov-2020 13:39:20 GMT; - Max-Age=86400; path=/; HttpOnly - Transfer-Encoding: - - chunked - Vary: - - Accept-Encoding - X-Powered-By: - - PHP/7.2.24 - status: - code: 404 - message: Not Found -- request: - body: name=foobar&description=new+section&permissions=%7B%223%22%3A%221%22%2C%222%22%3A%222%22%7D - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '91' - Content-Type: - - application/x-www-form-urlencoded - User-Agent: - - python-requests/2.24.0 - method: POST - uri: https://ipam.example.org/api/ansible/sections - response: - body: - string: !!binary | - H4sIAAAAAAAAAw2KQQrAIAwEv1L2LCV6Er/RF0gMJQcraDyV/r25DTPzgkcTlEQxYG1mWQvF5paA - 7lxvj7iETcdz8JRq0hCgzXVM5Gja/aGTKH8/ecv1YU8AAAA= - headers: - Cache-Control: - - no-cache - Connection: - - Keep-Alive - Content-Encoding: - - gzip - Content-Type: - - application/json; charset=utf-8 - Date: - - Wed, 04 Nov 2020 13:39:20 GMT - Expires: - - Thu, 19 Nov 1981 08:52:00 GMT - Keep-Alive: - - timeout=5, max=100 - Location: - - /api/ansible/sections/120/ - Pragma: - - no-cache - Server: - - Apache/2.4.37 (centos) OpenSSL/1.1.1c - Set-Cookie: - - phpipam=ctsoadk12nh0sahhqvphka90nm; expires=Thu, 05-Nov-2020 13:39:20 GMT; - Max-Age=86400; path=/; HttpOnly - Transfer-Encoding: - - chunked - Vary: - - Accept-Encoding - X-Powered-By: - - PHP/7.2.24 - status: - code: 201 - message: Created -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python-requests/2.24.0 - method: GET - uri: https://ipam.example.org/api/ansible/sections/foobar - response: - body: - string: !!binary | - H4sIAAAAAAAAA02PzWrEIBRGX6V8aykms3NXGLpqp9BAV24cvW2FRAevMpSQd6/aBLoRz+H+fHeF - jY6gRikFuFhLzFA5FRJwJhuoFd5BYRglBIJZajE+Y7yaVNkR2+Rv2cdQdaD7A5PtJLAYzpSmnRVa - /43S4pmrqFuwapw0lMagITTG/q/vVis5J2/zaw+HoYlyDZTfkqPkwxdUKPMsEBsfQM7ns8l0MH/H - +9TbjhlVfLw8XfY0Hd+f/9FUasK2Jsw/uz5fpr95m0D27Xz5KOVp+wVsLmGDOgEAAA== - headers: - Cache-Control: - - no-cache - Connection: - - Keep-Alive - Content-Encoding: - - gzip - Content-Type: - - application/json; charset=utf-8 - Date: - - Wed, 04 Nov 2020 13:39:20 GMT - Expires: - - Thu, 19 Nov 1981 08:52:00 GMT - Keep-Alive: - - timeout=5, max=100 - Pragma: - - no-cache - Server: - - Apache/2.4.37 (centos) OpenSSL/1.1.1c - Set-Cookie: - - phpipam=tmmp6ucdm2qdbk599ooahve4rn; expires=Thu, 05-Nov-2020 13:39:20 GMT; - Max-Age=86400; path=/; HttpOnly - Transfer-Encoding: - - chunked - Vary: - - Accept-Encoding - X-Powered-By: - - PHP/7.2.24 - status: - code: 200 - message: OK -version: 1 diff --git a/tests/fixtures/test_create_vlan.yml b/tests/fixtures/test_create_vlan.yml deleted file mode 100644 index eb0b679..0000000 --- a/tests/fixtures/test_create_vlan.yml +++ /dev/null @@ -1,156 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python-requests/2.24.0 - method: GET - uri: https://ipam.example.org/api/ansible/vlan/?filter_by=name&filter_value=my+vlan - response: - body: - string: !!binary | - H4sIAAAAAAAAA6tWSs5PSVWyMjEw0VEqLk1OTi0uVrJKS8wpTtVRygVyEtOBskp++QpFqcWlOSXF - ChppmTklqUUKiQUFOZmpKZpKOkolmblARQZ6BgYmtQBnBaDXUQAAAA== - headers: - Cache-Control: - - no-cache - Connection: - - Keep-Alive - Content-Encoding: - - gzip - Content-Type: - - application/json; charset=utf-8 - Date: - - Wed, 04 Nov 2020 13:39:21 GMT - Expires: - - Thu, 19 Nov 1981 08:52:00 GMT - Keep-Alive: - - timeout=5, max=100 - Pragma: - - no-cache - Server: - - Apache/2.4.37 (centos) OpenSSL/1.1.1c - Set-Cookie: - - phpipam=s1nmu0691tk0g69200bm4jr7is; expires=Thu, 05-Nov-2020 13:39:21 GMT; - Max-Age=86400; path=/; HttpOnly - Transfer-Encoding: - - chunked - Vary: - - Accept-Encoding - X-Powered-By: - - PHP/7.2.24 - status: - code: 404 - message: Not Found -- request: - body: name=my+vlan&number=1337 - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '24' - Content-Type: - - application/x-www-form-urlencoded - User-Agent: - - python-requests/2.24.0 - method: POST - uri: https://ipam.example.org/api/ansible/vlan - response: - body: - string: !!binary | - H4sIAAAAAAAAA6tWSs5PSVWyMjIw1FEqLk1OTi0uVrIqKSpN1VHKBbIT04GSSmE5iXkKyUWpiSWp - KUo6SpkpQDFTMyCrJDMXKG+gZ2BoUgsAL5ZeVEsAAAA= - headers: - Cache-Control: - - no-cache - Connection: - - Keep-Alive - Content-Encoding: - - gzip - Content-Type: - - application/json; charset=utf-8 - Date: - - Wed, 04 Nov 2020 13:39:22 GMT - Expires: - - Thu, 19 Nov 1981 08:52:00 GMT - Keep-Alive: - - timeout=5, max=100 - Location: - - /api/ansible/vlans/56/ - Pragma: - - no-cache - Server: - - Apache/2.4.37 (centos) OpenSSL/1.1.1c - Set-Cookie: - - phpipam=u9h67bd05snjmdra8brvr1db8p; expires=Thu, 05-Nov-2020 13:39:22 GMT; - Max-Age=86400; path=/; HttpOnly - Transfer-Encoding: - - chunked - Vary: - - Accept-Encoding - X-Powered-By: - - PHP/7.2.24 - status: - code: 201 - message: Created -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python-requests/2.24.0 - method: GET - uri: https://ipam.example.org/api/ansible/vlan/?filter_by=name&filter_value=my+vlan - response: - body: - string: !!binary | - H4sIAAAAAAAAAzWMywpCIRRFfyX2WMKSChw36Rsi4qRnIPgIPQZxuf+ecmm41n4scMUz7FFrhdad - 49ZgpXZW8CQEe1/wiZRvHhanM4YuicLGh4GZ0tgjfXezNkVPL64zNeYy+9xcDW8JJcPmHqMC+yBX - Ev6z601K4voMflPrQ0HCPNZ7rc36A8HHFdqnAAAA - headers: - Cache-Control: - - no-cache - Connection: - - Keep-Alive - Content-Encoding: - - gzip - Content-Type: - - application/json; charset=utf-8 - Date: - - Wed, 04 Nov 2020 13:39:22 GMT - Expires: - - Thu, 19 Nov 1981 08:52:00 GMT - Keep-Alive: - - timeout=5, max=100 - Pragma: - - no-cache - Server: - - Apache/2.4.37 (centos) OpenSSL/1.1.1c - Set-Cookie: - - phpipam=sbhtfu1s680ifh9oennpmqlk29; expires=Thu, 05-Nov-2020 13:39:22 GMT; - Max-Age=86400; path=/; HttpOnly - Transfer-Encoding: - - chunked - Vary: - - Accept-Encoding - X-Powered-By: - - PHP/7.2.24 - status: - code: 200 - message: OK -version: 1 diff --git a/tests/fixtures/test_custom_user_agent.yml b/tests/fixtures/test_custom_user_agent.yml deleted file mode 100644 index 4b61ef9..0000000 --- a/tests/fixtures/test_custom_user_agent.yml +++ /dev/null @@ -1,54 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' - User-Agent: - - python-requests/2.24.0 - method: POST - uri: https://ipam.example.org/api/ansible/user - response: - body: - string: !!binary | - H4sIAAAAAAAAAw3NSwrCMBQF0K3IHSdyE0XJmyvOBH8DJ1KSN6jFVpoUC6V7tws4nAmxSwrxpEEe - YtScIaUf1CBVpYJMKF2jLQT5YcPhdT69L/H+bI+a7Pi77m4BBjp+614XCU9P65zlduUpmyBuj9mg - 1J9l4ZoM8x9GzfvadAAAAA== - headers: - Cache-Control: - - no-cache - Connection: - - Keep-Alive - Content-Encoding: - - gzip - Content-Type: - - application/json; charset=utf-8 - Date: - - Wed, 04 Nov 2020 13:39:17 GMT - Expires: - - Thu, 19 Nov 1981 08:52:00 GMT - Keep-Alive: - - timeout=5, max=100 - Pragma: - - no-cache - Server: - - Apache/2.4.37 (centos) OpenSSL/1.1.1c - Set-Cookie: - - phpipam=e1gebg3pb3oif2acjd0fghj8eq; expires=Thu, 05-Nov-2020 13:39:17 GMT; - Max-Age=86400; path=/; HttpOnly - Transfer-Encoding: - - chunked - Vary: - - Accept-Encoding - X-Powered-By: - - PHP/7.2.24 - status: - code: 200 - message: OK -version: 1 diff --git a/tests/fixtures/test_delete_nameserver.yml b/tests/fixtures/test_delete_nameserver.yml deleted file mode 100644 index 2eeaca1..0000000 --- a/tests/fixtures/test_delete_nameserver.yml +++ /dev/null @@ -1,152 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python-requests/2.24.0 - method: GET - uri: https://ipam.example.org/api/ansible/tools/nameservers/?filter_by=name&filter_value=my+dns - response: - body: - string: !!binary | - H4sIAAAAAAAAA02NuwrDMAxFfyVodoLkhpZ47l+UDsbS4CEPLKcQQv69MnToeI/O1T0hrSwQPKID - 3VMSVQi17OKAY40QXidkhgB3AgdLnE2G+eh40V/W8iFj5B8DDtgsFk0lbzWvix3+UheZhc3YpMxZ - 1ZC2qhHhXJ+xtu8ePfZEPY4djeE2BZrgejuouY3bBo7XFxEdJfy4AAAA - headers: - Cache-Control: - - no-cache - Connection: - - Keep-Alive - Content-Encoding: - - gzip - Content-Type: - - application/json; charset=utf-8 - Date: - - Wed, 04 Nov 2020 13:39:19 GMT - Expires: - - Thu, 19 Nov 1981 08:52:00 GMT - Keep-Alive: - - timeout=5, max=100 - Pragma: - - no-cache - Server: - - Apache/2.4.37 (centos) OpenSSL/1.1.1c - Set-Cookie: - - phpipam=7l14k21eoh6avj4826qq4237ub; expires=Thu, 05-Nov-2020 13:39:19 GMT; - Max-Age=86400; path=/; HttpOnly - Transfer-Encoding: - - chunked - Vary: - - Accept-Encoding - X-Powered-By: - - PHP/7.2.24 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' - User-Agent: - - python-requests/2.24.0 - method: DELETE - uri: https://ipam.example.org/api/ansible/tools/nameservers/61 - response: - body: - string: !!binary | - H4sIAAAAAAAAAw3KMQqAMBBE0avI1EEWK8lt4mYQxRjIbmzEu5vuwf8vtGYiLiIB1lVphuitM6AM - p31E3GmY7WGzqW4n1afMi86MAD/KeGQWWb8fXwNW+U8AAAA= - headers: - Cache-Control: - - no-cache - Connection: - - Keep-Alive - Content-Encoding: - - gzip - Content-Type: - - application/json; charset=utf-8 - Date: - - Wed, 04 Nov 2020 13:39:19 GMT - Expires: - - Thu, 19 Nov 1981 08:52:00 GMT - Keep-Alive: - - timeout=5, max=100 - Pragma: - - no-cache - Server: - - Apache/2.4.37 (centos) OpenSSL/1.1.1c - Set-Cookie: - - phpipam=11beq4uj815021pn69isi00aqj; expires=Thu, 05-Nov-2020 13:39:19 GMT; - Max-Age=86400; path=/; HttpOnly - Transfer-Encoding: - - chunked - Vary: - - Accept-Encoding - X-Powered-By: - - PHP/7.2.24 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python-requests/2.24.0 - method: GET - uri: https://ipam.example.org/api/ansible/tools/nameservers/?filter_by=name&filter_value=my+dns - response: - body: - string: !!binary | - H4sIAAAAAAAAA6tWSs5PSVWyMjEw0VEqLk1OTi0uVrJKS8wpTtVRygVyEtOBskp++QpFqcWlOSXF - ChppmTklqUUKiQUFOZmpKZpKOkolmblARQZ6BgbGtQCgk+GYUQAAAA== - headers: - Cache-Control: - - no-cache - Connection: - - Keep-Alive - Content-Encoding: - - gzip - Content-Type: - - application/json; charset=utf-8 - Date: - - Wed, 04 Nov 2020 13:39:19 GMT - Expires: - - Thu, 19 Nov 1981 08:52:00 GMT - Keep-Alive: - - timeout=5, max=100 - Pragma: - - no-cache - Server: - - Apache/2.4.37 (centos) OpenSSL/1.1.1c - Set-Cookie: - - phpipam=i2bq7mj87ths2l2s1bhkc6ejkl; expires=Thu, 05-Nov-2020 13:39:19 GMT; - Max-Age=86400; path=/; HttpOnly - Transfer-Encoding: - - chunked - Vary: - - Accept-Encoding - X-Powered-By: - - PHP/7.2.24 - status: - code: 404 - message: Not Found -version: 1 diff --git a/tests/fixtures/test_delete_section.yml b/tests/fixtures/test_delete_section.yml deleted file mode 100644 index 209551f..0000000 --- a/tests/fixtures/test_delete_section.yml +++ /dev/null @@ -1,154 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python-requests/2.24.0 - method: GET - uri: https://ipam.example.org/api/ansible/sections/foobar - response: - body: - string: !!binary | - H4sIAAAAAAAAA02QT2sDIRTEv0qYsym6m0u9FUJPaQpd6GkvRl9bYVeDfwhl2e9etRvIRZwfz5l5 - LtDeEGTHOUPMWlOMkClkYjAqKcgF1kBCdBwMTs1lGF/eX1Qo2lDUwV6T9a5gR7fdI2GYVUwUBtLb - RPW4UphtjAWUJCwj+hFyhBjBRnTtXs61TMYUrE5vrSBEBfniKL0HQ8G6b0iXp4nBV30XZGw6qlRf - dLzjeyH2/LATB9k/y7ZC/PG3ofncTQv4PL2ct3pNfrw+qCGXyjXXTb8bPp6H/8CVIdn6J/yJ8379 - A+B1YcBPAQAA - headers: - Cache-Control: - - no-cache - Connection: - - Keep-Alive - Content-Encoding: - - gzip - Content-Type: - - application/json; charset=utf-8 - Date: - - Wed, 04 Nov 2020 13:39:21 GMT - Expires: - - Thu, 19 Nov 1981 08:52:00 GMT - Keep-Alive: - - timeout=5, max=100 - Pragma: - - no-cache - Server: - - Apache/2.4.37 (centos) OpenSSL/1.1.1c - Set-Cookie: - - phpipam=3siavl1rat5e2il2l4p2lsppml; expires=Thu, 05-Nov-2020 13:39:21 GMT; - Max-Age=86400; path=/; HttpOnly - Transfer-Encoding: - - chunked - Vary: - - Accept-Encoding - X-Powered-By: - - PHP/7.2.24 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' - User-Agent: - - python-requests/2.24.0 - method: DELETE - uri: https://ipam.example.org/api/ansible/sections/120 - response: - body: - string: !!binary | - H4sIAAAAAAAAA6tWSs5PSVWyMjIw0FEqLk1OTi0uVrIqKSpN1VEqycwFyhjoGRhY1gIAFM+iSSgA - AAA= - headers: - Cache-Control: - - no-cache - Connection: - - Keep-Alive - Content-Encoding: - - gzip - Content-Type: - - application/json; charset=utf-8 - Date: - - Wed, 04 Nov 2020 13:39:21 GMT - Expires: - - Thu, 19 Nov 1981 08:52:00 GMT - Keep-Alive: - - timeout=5, max=100 - Pragma: - - no-cache - Server: - - Apache/2.4.37 (centos) OpenSSL/1.1.1c - Set-Cookie: - - phpipam=us0lrl4u86k3us4v269rbbo7pb; expires=Thu, 05-Nov-2020 13:39:21 GMT; - Max-Age=86400; path=/; HttpOnly - Transfer-Encoding: - - chunked - Vary: - - Accept-Encoding - X-Powered-By: - - PHP/7.2.24 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python-requests/2.24.0 - method: GET - uri: https://ipam.example.org/api/ansible/sections/foobar - response: - body: - string: !!binary | - H4sIAAAAAAAAA6tWSs5PSVWyMjEw0VEqLk1OTi0uVrJKS8wpTtVRygVyEtOBskp++SUKbvmleSlK - OkolmblAIQM9AwPjWgChqv3nPwAAAA== - headers: - Cache-Control: - - no-cache - Connection: - - Keep-Alive - Content-Encoding: - - gzip - Content-Type: - - application/json; charset=utf-8 - Date: - - Wed, 04 Nov 2020 13:39:21 GMT - Expires: - - Thu, 19 Nov 1981 08:52:00 GMT - Keep-Alive: - - timeout=5, max=100 - Pragma: - - no-cache - Server: - - Apache/2.4.37 (centos) OpenSSL/1.1.1c - Set-Cookie: - - phpipam=aqdhu4tksfbctcbmn6bj94iar7; expires=Thu, 05-Nov-2020 13:39:21 GMT; - Max-Age=86400; path=/; HttpOnly - Transfer-Encoding: - - chunked - Vary: - - Accept-Encoding - X-Powered-By: - - PHP/7.2.24 - status: - code: 404 - message: Not Found -version: 1 diff --git a/tests/fixtures/test_delete_vlan.yml b/tests/fixtures/test_delete_vlan.yml deleted file mode 100644 index 04fc4eb..0000000 --- a/tests/fixtures/test_delete_vlan.yml +++ /dev/null @@ -1,152 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python-requests/2.24.0 - method: GET - uri: https://ipam.example.org/api/ansible/vlan/?filter_by=name&filter_value=my+vlan - response: - body: - string: !!binary | - H4sIAAAAAAAAA02NywrCMBBFf6XMupVJUhWz7sZvEJGYzCLQJJKHIKX/7gQ3Lu+Zc+duYJMj0BJx - hNKspVJA19xoBGeqAX3b4L2aeHWg4XgCxikY/8uCYzSB+xA+Q9c6aOFJuV+VOnefis3+VX2KDP/S - YJwjxwY5XxdT+xuJEichJpwHMWt10VKyYFupKVB+eF6NbV33+wjV92E8IKr9Cz8ztxHHAAAA - headers: - Cache-Control: - - no-cache - Connection: - - Keep-Alive - Content-Encoding: - - gzip - Content-Type: - - application/json; charset=utf-8 - Date: - - Wed, 04 Nov 2020 13:39:23 GMT - Expires: - - Thu, 19 Nov 1981 08:52:00 GMT - Keep-Alive: - - timeout=5, max=100 - Pragma: - - no-cache - Server: - - Apache/2.4.37 (centos) OpenSSL/1.1.1c - Set-Cookie: - - phpipam=6h59vtuj0078khf46le2ccko4i; expires=Thu, 05-Nov-2020 13:39:23 GMT; - Max-Age=86400; path=/; HttpOnly - Transfer-Encoding: - - chunked - Vary: - - Accept-Encoding - X-Powered-By: - - PHP/7.2.24 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' - User-Agent: - - python-requests/2.24.0 - method: DELETE - uri: https://ipam.example.org/api/ansible/vlan/56 - response: - body: - string: !!binary | - H4sIAAAAAAAAA6tWSs5PSVWyMjIw0FEqLk1OTi0uVrIqKSpN1VHKBbIT04GSSmE5iXkKKak5qSWp - KUo6SiWZuUBRAz0DY+NaAPBnWSBBAAAA - headers: - Cache-Control: - - no-cache - Connection: - - Keep-Alive - Content-Encoding: - - gzip - Content-Type: - - application/json; charset=utf-8 - Date: - - Wed, 04 Nov 2020 13:39:23 GMT - Expires: - - Thu, 19 Nov 1981 08:52:00 GMT - Keep-Alive: - - timeout=5, max=100 - Pragma: - - no-cache - Server: - - Apache/2.4.37 (centos) OpenSSL/1.1.1c - Set-Cookie: - - phpipam=athjrkehau5kbh4t3j4jqnjg28; expires=Thu, 05-Nov-2020 13:39:23 GMT; - Max-Age=86400; path=/; HttpOnly - Transfer-Encoding: - - chunked - Vary: - - Accept-Encoding - X-Powered-By: - - PHP/7.2.24 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python-requests/2.24.0 - method: GET - uri: https://ipam.example.org/api/ansible/vlan/?filter_by=name&filter_value=my+vlan - response: - body: - string: !!binary | - H4sIAAAAAAAAA6tWSs5PSVWyMjEw0VEqLk1OTi0uVrJKS8wpTtVRygVyEtOBskp++QpFqcWlOSXF - ChppmTklqUUKiQUFOZmpKZpKOkolmblARQZ6BgbGtQCgk+GYUQAAAA== - headers: - Cache-Control: - - no-cache - Connection: - - Keep-Alive - Content-Encoding: - - gzip - Content-Type: - - application/json; charset=utf-8 - Date: - - Wed, 04 Nov 2020 13:39:23 GMT - Expires: - - Thu, 19 Nov 1981 08:52:00 GMT - Keep-Alive: - - timeout=5, max=100 - Pragma: - - no-cache - Server: - - Apache/2.4.37 (centos) OpenSSL/1.1.1c - Set-Cookie: - - phpipam=kt23cgn90d8o8f67l5i2lvbp3h; expires=Thu, 05-Nov-2020 13:39:23 GMT; - Max-Age=86400; path=/; HttpOnly - Transfer-Encoding: - - chunked - Vary: - - Accept-Encoding - X-Powered-By: - - PHP/7.2.24 - status: - code: 404 - message: Not Found -version: 1 diff --git a/tests/fixtures/test_entity_not_found_exception.yml b/tests/fixtures/test_entity_not_found_exception.yml deleted file mode 100644 index 8b8163c..0000000 --- a/tests/fixtures/test_entity_not_found_exception.yml +++ /dev/null @@ -1,616 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python-requests/2.24.0 - method: GET - uri: https://ipam.example.org/api/ansible/subnets/cidr/172.16.0.0/24/?filter_by=sectionId&filter_value=1 - response: - body: - string: '{"code":200,"success":false,"message":"No subnets found","time":0.005}' - headers: - Cache-Control: - - no-cache - Connection: - - Keep-Alive - Content-Length: - - '70' - Content-Type: - - application/json; charset=utf-8 - Date: - - Fri, 17 Jun 2022 17:19:55 GMT - Expires: - - Thu, 19 Nov 1981 08:52:00 GMT - Keep-Alive: - - timeout=5, max=100 - Pragma: - - no-cache - Server: - - Apache - Set-Cookie: - - phpipam=qobg612scen5cg0q3tucrl4ft1; expires=Sat, 18 Jun 2022 17:19:55 +0000; - Max-Age=86400; path=/; SameSite=Lax; HttpOnly; - X-Powered-By: - - PHP/7.4.25 - status: - code: 200 - message: OK -- request: - body: subnet=172.16.0.0&mask=24&description=Test+subnet§ionId=1 - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '61' - Content-Type: - - application/x-www-form-urlencoded - User-Agent: - - python-requests/2.24.0 - method: POST - uri: https://ipam.example.org/api/ansible/subnets - response: - body: - string: '{"code":201,"success":true,"message":"Subnet created","id":"7","data":"172.16.0.0\/24","time":0.01}' - headers: - Cache-Control: - - no-cache - Connection: - - Keep-Alive - Content-Length: - - '99' - Content-Type: - - application/json; charset=utf-8 - Date: - - Fri, 17 Jun 2022 17:19:55 GMT - Expires: - - Thu, 19 Nov 1981 08:52:00 GMT - Keep-Alive: - - timeout=5, max=100 - Location: - - /api/ansible/subnets/7/ - Pragma: - - no-cache - Server: - - Apache - Set-Cookie: - - phpipam=tb357464vtqrovim5frofkftv6; expires=Sat, 18 Jun 2022 17:19:55 +0000; - Max-Age=86400; path=/; SameSite=Lax; HttpOnly; - X-Powered-By: - - PHP/7.4.25 - status: - code: 201 - message: Created -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python-requests/2.24.0 - method: GET - uri: https://ipam.example.org/api/ansible/subnets/cidr/172.16.0.0/24 - response: - body: - string: '{"code":200,"success":true,"data":[{"id":"7","subnet":"172.16.0.0","mask":"24","sectionId":"1","description":"Test - subnet","linked_subnet":null,"firewallAddressObject":null,"vrfId":null,"masterSubnetId":"0","allowRequests":"0","vlanId":null,"showName":"0","device":"0","permissions":"{\"3\":\"1\",\"2\":\"2\"}","pingSubnet":"0","discoverSubnet":"0","resolveDNS":"0","DNSrecursive":"0","DNSrecords":"0","nameserverId":"0","scanAgent":null,"customer_id":null,"isFolder":"0","isFull":"0","tag":"2","threshold":"0","location":null,"editDate":null,"lastScan":null,"lastDiscovery":null}],"time":0.002}' - headers: - Cache-Control: - - no-cache - Connection: - - Keep-Alive - Content-Length: - - '595' - Content-Type: - - application/json; charset=utf-8 - Date: - - Fri, 17 Jun 2022 17:19:55 GMT - Expires: - - Thu, 19 Nov 1981 08:52:00 GMT - Keep-Alive: - - timeout=5, max=100 - Pragma: - - no-cache - Server: - - Apache - Set-Cookie: - - phpipam=l058v1c85oaqqn4t3o42o5ct5i; expires=Sat, 18 Jun 2022 17:19:55 +0000; - Max-Age=86400; path=/; SameSite=Lax; HttpOnly; - X-Powered-By: - - PHP/7.4.25 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python-requests/2.24.0 - method: GET - uri: https://ipam.example.org/api/ansible/subnets/7/addresses - response: - body: - string: '{"code":200,"success":false,"message":"No addresses found","time":0.002}' - headers: - Cache-Control: - - no-cache - Connection: - - Keep-Alive - Content-Length: - - '72' - Content-Type: - - application/json; charset=utf-8 - Date: - - Fri, 17 Jun 2022 17:19:55 GMT - Expires: - - Thu, 19 Nov 1981 08:52:00 GMT - Keep-Alive: - - timeout=5, max=100 - Pragma: - - no-cache - Server: - - Apache - Set-Cookie: - - phpipam=khmc4upj4867krpc6qceoc41ci; expires=Sat, 18 Jun 2022 17:19:55 +0000; - Max-Age=86400; path=/; SameSite=Lax; HttpOnly; - X-Powered-By: - - PHP/7.4.25 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' - User-Agent: - - python-requests/2.24.0 - method: DELETE - uri: https://ipam.example.org/api/ansible/subnets/7 - response: - body: - string: '{"code":200,"success":true,"message":"Subnet deleted","time":0.012}' - headers: - Cache-Control: - - no-cache - Connection: - - Keep-Alive - Content-Length: - - '67' - Content-Type: - - application/json; charset=utf-8 - Date: - - Fri, 17 Jun 2022 17:19:55 GMT - Expires: - - Thu, 19 Nov 1981 08:52:00 GMT - Keep-Alive: - - timeout=5, max=100 - Pragma: - - no-cache - Server: - - Apache - Set-Cookie: - - phpipam=2cddlh0r9eiqeb4bna42sk3h1i; expires=Sat, 18 Jun 2022 17:19:55 +0000; - Max-Age=86400; path=/; SameSite=Lax; HttpOnly; - X-Powered-By: - - PHP/7.4.25 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' - User-Agent: - - python-requests/2.24.0 - method: POST - uri: https://ipam.example.org/api/ansible/user - response: - body: - string: '{"code":200,"success":true,"data":{"token":"xLmEsnDFDcdc2tMDvZ_ke2E4","expires":"2022-06-17 - 23:32:08"},"time":0.014}' - headers: - Cache-Control: - - no-cache - Connection: - - Keep-Alive - Content-Length: - - '116' - Content-Type: - - application/json; charset=utf-8 - Date: - - Fri, 17 Jun 2022 17:32:08 GMT - Expires: - - Thu, 19 Nov 1981 08:52:00 GMT - Keep-Alive: - - timeout=5, max=100 - Pragma: - - no-cache - Server: - - Apache - Set-Cookie: - - phpipam=heu0hf4t9uce8plstnf7odvmkj; expires=Sat, 18 Jun 2022 17:32:08 +0000; - Max-Age=86400; path=/; SameSite=Lax; HttpOnly; - X-Powered-By: - - PHP/7.4.25 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python-requests/2.24.0 - method: GET - uri: https://ipam.example.org/api/ansible/subnets/cidr/1.2.3.4 - response: - body: - string: '{"code":200,"success":false,"message":"No subnets found","time":0.002}' - headers: - Cache-Control: - - no-cache - Connection: - - Keep-Alive - Content-Length: - - '70' - Content-Type: - - application/json; charset=utf-8 - Date: - - Fri, 17 Jun 2022 17:32:08 GMT - Expires: - - Thu, 19 Nov 1981 08:52:00 GMT - Keep-Alive: - - timeout=5, max=100 - Pragma: - - no-cache - Server: - - Apache - Set-Cookie: - - phpipam=4dk5cj9jkb0ignqsa78jbca1tk; expires=Sat, 18 Jun 2022 17:32:08 +0000; - Max-Age=86400; path=/; SameSite=Lax; HttpOnly; - X-Powered-By: - - PHP/7.4.25 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python-requests/2.24.0 - method: GET - uri: https://ipam.example.org/api/ansible/addresses/search/1.2.3.4 - response: - body: - string: '{"code":200,"success":false,"message":"Address not found","time":0.01}' - headers: - Cache-Control: - - no-cache - Connection: - - Keep-Alive - Content-Length: - - '70' - Content-Type: - - application/json; charset=utf-8 - Date: - - Fri, 17 Jun 2022 17:32:09 GMT - Expires: - - Thu, 19 Nov 1981 08:52:00 GMT - Keep-Alive: - - timeout=5, max=100 - Pragma: - - no-cache - Server: - - Apache - Set-Cookie: - - phpipam=t3mfkb80hnoe34hqgu734rneth; expires=Sat, 18 Jun 2022 17:32:09 +0000; - Max-Age=86400; path=/; SameSite=Lax; HttpOnly; - X-Powered-By: - - PHP/7.4.25 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python-requests/2.24.0 - method: GET - uri: https://ipam.example.org/api/ansible/vlans//1337 - response: - body: - string: '{"code":200,"success":false,"message":"Vlan not found","time":0.006}' - headers: - Cache-Control: - - no-cache - Connection: - - Keep-Alive - Content-Length: - - '68' - Content-Type: - - application/json; charset=utf-8 - Date: - - Fri, 17 Jun 2022 17:32:09 GMT - Expires: - - Thu, 19 Nov 1981 08:52:00 GMT - Keep-Alive: - - timeout=5, max=100 - Pragma: - - no-cache - Server: - - Apache - Set-Cookie: - - phpipam=dktkh5dsc2ptaj8hnlgkvh75km; expires=Sat, 18 Jun 2022 17:32:09 +0000; - Max-Age=86400; path=/; SameSite=Lax; HttpOnly; - X-Powered-By: - - PHP/7.4.25 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python-requests/2.24.0 - method: GET - uri: https://ipam.example.org/api/ansible/vrf - response: - body: - string: '{"code":200,"success":false,"message":"No vrfs configured","time":0.007}' - headers: - Cache-Control: - - no-cache - Connection: - - Keep-Alive - Content-Length: - - '72' - Content-Type: - - application/json; charset=utf-8 - Date: - - Fri, 17 Jun 2022 17:32:09 GMT - Expires: - - Thu, 19 Nov 1981 08:52:00 GMT - Keep-Alive: - - timeout=5, max=100 - Pragma: - - no-cache - Server: - - Apache - Set-Cookie: - - phpipam=1fee1qpatb31teq398v2apu7qf; expires=Sat, 18 Jun 2022 17:32:09 +0000; - Max-Age=86400; path=/; SameSite=Lax; HttpOnly; - X-Powered-By: - - PHP/7.4.25 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python-requests/2.24.0 - method: GET - uri: https://ipam.example.org/api/ansible/devices//1337 - response: - body: - string: '{"code":404,"success":false,"message":"Device not found","time":0.003}' - headers: - Cache-Control: - - no-cache - Connection: - - Keep-Alive - Content-Length: - - '70' - Content-Type: - - application/json; charset=utf-8 - Date: - - Fri, 17 Jun 2022 17:32:09 GMT - Expires: - - Thu, 19 Nov 1981 08:52:00 GMT - Keep-Alive: - - timeout=5, max=100 - Pragma: - - no-cache - Server: - - Apache - Set-Cookie: - - phpipam=62oh04h2dsso9stpgs4u5qck01; expires=Sat, 18 Jun 2022 17:32:09 +0000; - Max-Age=86400; path=/; SameSite=Lax; HttpOnly; - X-Powered-By: - - PHP/7.4.25 - status: - code: 404 - message: Not Found -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python-requests/2.24.0 - method: GET - uri: https://ipam.example.org/api/ansible/sections/?filter_by=name&filter_match=full&filter_value=not_existing_section - response: - body: - string: '{"code":404,"success":false,"message":"No results (filter applied)","time":0.003}' - headers: - Cache-Control: - - no-cache - Connection: - - Keep-Alive - Content-Length: - - '81' - Content-Type: - - application/json; charset=utf-8 - Date: - - Fri, 17 Jun 2022 17:32:09 GMT - Expires: - - Thu, 19 Nov 1981 08:52:00 GMT - Keep-Alive: - - timeout=5, max=100 - Pragma: - - no-cache - Server: - - Apache - Set-Cookie: - - phpipam=ub5g10oa1jm6ee2t5fv8dn4iun; expires=Sat, 18 Jun 2022 17:32:09 +0000; - Max-Age=86400; path=/; SameSite=Lax; HttpOnly; - X-Powered-By: - - PHP/7.4.25 - status: - code: 404 - message: Not Found -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python-requests/2.24.0 - method: GET - uri: https://ipam.example.org/api/ansible/tools/device_types//1337 - response: - body: - string: '{"code":200,"success":false,"message":"No objects found","time":0.003}' - headers: - Cache-Control: - - no-cache - Connection: - - Keep-Alive - Content-Length: - - '70' - Content-Type: - - application/json; charset=utf-8 - Date: - - Fri, 17 Jun 2022 17:32:09 GMT - Expires: - - Thu, 19 Nov 1981 08:52:00 GMT - Keep-Alive: - - timeout=5, max=100 - Pragma: - - no-cache - Server: - - Apache - Set-Cookie: - - phpipam=mfho6tlf2o9f1g9jklqlbs6vnu; expires=Sat, 18 Jun 2022 17:32:09 +0000; - Max-Age=86400; path=/; SameSite=Lax; HttpOnly; - X-Powered-By: - - PHP/7.4.25 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python-requests/2.24.0 - method: GET - uri: https://ipam.example.org/api/ansible/addresses/search_hostname/not_existing_hostname - response: - body: - string: '{"code":200,"success":false,"message":"Hostname not found","time":0.005}' - headers: - Cache-Control: - - no-cache - Connection: - - Keep-Alive - Content-Length: - - '72' - Content-Type: - - application/json; charset=utf-8 - Date: - - Fri, 17 Jun 2022 17:32:09 GMT - Expires: - - Thu, 19 Nov 1981 08:52:00 GMT - Keep-Alive: - - timeout=5, max=100 - Pragma: - - no-cache - Server: - - Apache - Set-Cookie: - - phpipam=2d249dg3pqificihkqnoepplo8; expires=Sat, 18 Jun 2022 17:32:09 +0000; - Max-Age=86400; path=/; SameSite=Lax; HttpOnly; - X-Powered-By: - - PHP/7.4.25 - status: - code: 200 - message: OK -version: 1 diff --git a/tests/fixtures/test_invalid_credentials_exception.yml b/tests/fixtures/test_invalid_credentials_exception.yml deleted file mode 100644 index ba5ae87..0000000 --- a/tests/fixtures/test_invalid_credentials_exception.yml +++ /dev/null @@ -1,100 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' - User-Agent: - - python-requests/2.24.0 - method: POST - uri: https://ipam.example.org/api/ansible/user - response: - body: - string: !!binary | - H4sIAAAAAAAAA6tWSs5PSVWyMjUw0FEqLk1OTi0uVrJKS8wpTtVRygVyEtOBskqeeWWJOZkpCqXF - qUV5ibmpCvlFCgWJxcXl+UUpSjpKJZm5QFUGegYGprUAJAJCalIAAAA= - headers: - Cache-Control: - - no-cache - Connection: - - close - Content-Encoding: - - gzip - Content-Type: - - application/json; charset=utf-8 - Date: - - Wed, 04 Nov 2020 13:39:23 GMT - Expires: - - Thu, 19 Nov 1981 08:52:00 GMT - Pragma: - - no-cache - Server: - - Apache/2.4.37 (centos) OpenSSL/1.1.1c - Set-Cookie: - - phpipam=12fjtooegcscoqu4rq58j3uc8j; expires=Thu, 05-Nov-2020 13:39:23 GMT; - Max-Age=86400; path=/; HttpOnly - Transfer-Encoding: - - chunked - Vary: - - Accept-Encoding - X-Powered-By: - - PHP/7.2.24 - status: - code: 500 - message: Internal Server Error -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' - User-Agent: - - python-requests/2.24.0 - method: POST - uri: https://ipam.example.org/api/ansible/user - response: - body: - string: !!binary | - H4sIAAAAAAAAA6tWSs5PSVWyMjUw0FEqLk1OTi0uVrJKS8wpTtVRygVyEtOBskqeeWWJOZkpCqXF - qUV5ibmpCvlFCgWJxcXl+UUpSjpKJZm5QFUGegYG5rUApmB0WFIAAAA= - headers: - Cache-Control: - - no-cache - Connection: - - close - Content-Encoding: - - gzip - Content-Type: - - application/json; charset=utf-8 - Date: - - Wed, 04 Nov 2020 13:39:24 GMT - Expires: - - Thu, 19 Nov 1981 08:52:00 GMT - Pragma: - - no-cache - Server: - - Apache/2.4.37 (centos) OpenSSL/1.1.1c - Set-Cookie: - - phpipam=juok1n1c6dfs09t09iqc394pmn; expires=Thu, 05-Nov-2020 13:39:24 GMT; - Max-Age=86400; path=/; HttpOnly - Transfer-Encoding: - - chunked - Vary: - - Accept-Encoding - X-Powered-By: - - PHP/7.2.24 - status: - code: 500 - message: Internal Server Error -version: 1 diff --git a/tests/fixtures/test_invalid_syntax_exception.yml b/tests/fixtures/test_invalid_syntax_exception.yml deleted file mode 100644 index 758ef2e..0000000 --- a/tests/fixtures/test_invalid_syntax_exception.yml +++ /dev/null @@ -1,51 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' - User-Agent: - - python-requests/2.24.0 - method: POST - uri: https://ipam.example.org/api/faulty%20data/user - response: - body: - string: !!binary | - H4sIAAAAAAAAA6tWSs5PSVWyMjEw0FEqLk1OTi0uVrJKS8wpTtVRygVyEtOBskqeeWWJOZkpCokF - BTmZyYklmfl5CpkpSjpKJZm5QHmDWgBOB7BhSAAAAA== - headers: - Cache-Control: - - no-cache - Connection: - - close - Content-Encoding: - - gzip - Content-Type: - - application/json; charset=utf-8 - Date: - - Wed, 04 Nov 2020 13:39:23 GMT - Expires: - - Thu, 19 Nov 1981 08:52:00 GMT - Pragma: - - no-cache - Server: - - Apache/2.4.37 (centos) OpenSSL/1.1.1c - Set-Cookie: - - phpipam=0r1j63842r87c6skgjhb7u27r5; expires=Thu, 05-Nov-2020 13:39:23 GMT; - Max-Age=86400; path=/; HttpOnly - Transfer-Encoding: - - chunked - Vary: - - Accept-Encoding - X-Powered-By: - - PHP/7.2.24 - status: - code: 400 - message: Bad Request -version: 1 diff --git a/tests/fixtures/test_search_existing_section.yml b/tests/fixtures/test_search_existing_section.yml deleted file mode 100644 index 93fe760..0000000 --- a/tests/fixtures/test_search_existing_section.yml +++ /dev/null @@ -1,54 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python-requests/2.24.0 - method: GET - uri: https://ipam.example.org/api/ansible/sections/?filter_by=name&filter_value=IPv6&filter_match=full - response: - body: - string: !!binary | - H4sIAAAAAAAAA02QQUvEMBCF/0p557Bku7CH3IRFEHQVC16Mh5iMa6BNliRVpPS/O6kteAnzPl7e - PGaCjY6gWikF8mgt5QxV0kgCzhQD9TrBOyi0EAhmYC/unr6OrBxlm/y1+BgYdmTr1HzE1FRDY5xL - nEaZrYPJhdJqYbNkdqU0+JwZ8EZMGgcNpbHXEBrtMvM7szOX5G15WIpiX8H4Hqg8JkfJhwtUGPte - IFa9CXK+nEyhTefP+N0t37YMBi/3N+e1zSKfb/+pbuSGdU3of1Z8Ond/efObQPH1GHIn5WH+BWf2 - 6dBHAQAA - headers: - Cache-Control: - - no-cache - Connection: - - Keep-Alive - Content-Encoding: - - gzip - Content-Type: - - application/json; charset=utf-8 - Date: - - Wed, 04 Nov 2020 13:39:24 GMT - Expires: - - Thu, 19 Nov 1981 08:52:00 GMT - Keep-Alive: - - timeout=5, max=100 - Pragma: - - no-cache - Server: - - Apache/2.4.37 (centos) OpenSSL/1.1.1c - Set-Cookie: - - phpipam=b27c0o91pp5q3irgqisonqv0cq; expires=Thu, 05-Nov-2020 13:39:24 GMT; - Max-Age=86400; path=/; HttpOnly - Transfer-Encoding: - - chunked - Vary: - - Accept-Encoding - X-Powered-By: - - PHP/7.2.24 - status: - code: 200 - message: OK -version: 1 diff --git a/tests/fixtures/test_search_not_existing_section.yml b/tests/fixtures/test_search_not_existing_section.yml deleted file mode 100644 index b4a03d0..0000000 --- a/tests/fixtures/test_search_not_existing_section.yml +++ /dev/null @@ -1,51 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python-requests/2.24.0 - method: GET - uri: https://ipam.example.org/api/ansible/sections/?filter_by=name&filter_value=non_existing_section - response: - body: - string: !!binary | - H4sIAAAAAAAAA6tWSs5PSVWyMjEw0VEqLk1OTi0uVrJKS8wpTtVRygVyEtOBskp++QpFqcWlOSXF - ChppmTklqUUKiQUFOZmpKZpKOkolmblARQZ6BgbGtQCgk+GYUQAAAA== - headers: - Cache-Control: - - no-cache - Connection: - - Keep-Alive - Content-Encoding: - - gzip - Content-Type: - - application/json; charset=utf-8 - Date: - - Wed, 04 Nov 2020 13:39:24 GMT - Expires: - - Thu, 19 Nov 1981 08:52:00 GMT - Keep-Alive: - - timeout=5, max=100 - Pragma: - - no-cache - Server: - - Apache/2.4.37 (centos) OpenSSL/1.1.1c - Set-Cookie: - - phpipam=6bi0finga1plqmvpduu8bvv8n1; expires=Thu, 05-Nov-2020 13:39:24 GMT; - Max-Age=86400; path=/; HttpOnly - Transfer-Encoding: - - chunked - Vary: - - Accept-Encoding - X-Powered-By: - - PHP/7.2.24 - status: - code: 404 - message: Not Found -version: 1 diff --git a/tests/fixtures/test_subnet_not_found.yml b/tests/fixtures/test_subnet_not_found.yml deleted file mode 100644 index 2c5383f..0000000 --- a/tests/fixtures/test_subnet_not_found.yml +++ /dev/null @@ -1,103 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' - User-Agent: - - python-requests/2.24.0 - method: POST - uri: https://ipam.example.org/api/ansible/user - response: - body: - string: !!binary | - H4sIAAAAAAAAAw3NwQqCQBAG4FeJ/7wb46TBzr3oJlh66BKyOweTNNyVBPHd8wE+vhV+DAphIoM4 - e68xQtI0q0FoUwtZkcZeBwhiY93lVd7ela+fw1WDXX7388PBQJdvN+kuwcRks8xSfmCSkxMusBmk - 7rMvdCRy2x/jgEHkdAAAAA== - headers: - Cache-Control: - - no-cache - Connection: - - Keep-Alive - Content-Encoding: - - gzip - Content-Type: - - application/json; charset=utf-8 - Date: - - Wed, 04 Nov 2020 13:39:25 GMT - Expires: - - Thu, 19 Nov 1981 08:52:00 GMT - Keep-Alive: - - timeout=5, max=100 - Pragma: - - no-cache - Server: - - Apache/2.4.37 (centos) OpenSSL/1.1.1c - Set-Cookie: - - phpipam=a6ojmiaffevmabg796nqrjsgpm; expires=Thu, 05-Nov-2020 13:39:25 GMT; - Max-Age=86400; path=/; HttpOnly - Transfer-Encoding: - - chunked - Vary: - - Accept-Encoding - X-Powered-By: - - PHP/7.2.24 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python-requests/2.24.0 - method: GET - uri: https://ipam.example.org/api/ansible/subnets/cidr/10.0.0.0/24 - response: - body: - string: !!binary | - H4sIAAAAAAAAA6tWSs5PSVWyMjIw0FEqLk1OTi0uVrJKS8wpTtVRygVyEtOBskp++QrFpUl5qSXF - Cmn5pXkpSjpKJZm5QBkDPQMDk1oA71UZV0YAAAA= - headers: - Cache-Control: - - no-cache - Connection: - - Keep-Alive - Content-Encoding: - - gzip - Content-Type: - - application/json; charset=utf-8 - Date: - - Wed, 04 Nov 2020 13:39:25 GMT - Expires: - - Thu, 19 Nov 1981 08:52:00 GMT - Keep-Alive: - - timeout=5, max=100 - Pragma: - - no-cache - Server: - - Apache/2.4.37 (centos) OpenSSL/1.1.1c - Set-Cookie: - - phpipam=hasdlesqn44qq2g3rtejagie0t; expires=Thu, 05-Nov-2020 13:39:25 GMT; - Max-Age=86400; path=/; HttpOnly - Transfer-Encoding: - - chunked - Vary: - - Accept-Encoding - X-Powered-By: - - PHP/7.2.24 - status: - code: 200 - message: OK -version: 1 diff --git a/tests/fixtures/test_update_nameserver.yml b/tests/fixtures/test_update_nameserver.yml deleted file mode 100644 index d843f31..0000000 --- a/tests/fixtures/test_update_nameserver.yml +++ /dev/null @@ -1,155 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python-requests/2.24.0 - method: GET - uri: https://ipam.example.org/api/ansible/tools/nameservers/?filter_by=name&filter_value=my+dns - response: - body: - string: !!binary | - H4sIAAAAAAAAAy3MwQrCMBCE4VeROYeSVFDI2bcQDyG7h4UmLdmtIKXvboIe5+djDuSVGHH23kH3 - nFkV0drODpQsIT4PCCHiFuBQU+kY5XOhqv+t7R16C/N98pMfilhzk81krYh1XxaHjVsR1V502I6Y - xB7J+CfOl4PJOO8f/np+Ad+A0J6YAAAA - headers: - Cache-Control: - - no-cache - Connection: - - Keep-Alive - Content-Encoding: - - gzip - Content-Type: - - application/json; charset=utf-8 - Date: - - Wed, 04 Nov 2020 13:39:18 GMT - Expires: - - Thu, 19 Nov 1981 08:52:00 GMT - Keep-Alive: - - timeout=5, max=100 - Pragma: - - no-cache - Server: - - Apache/2.4.37 (centos) OpenSSL/1.1.1c - Set-Cookie: - - phpipam=3mkpm8btajp5d0vpt544r1et22; expires=Thu, 05-Nov-2020 13:39:18 GMT; - Max-Age=86400; path=/; HttpOnly - Transfer-Encoding: - - chunked - Vary: - - Accept-Encoding - X-Powered-By: - - PHP/7.2.24 - status: - code: 200 - message: OK -- request: - body: name=my+dns&namesrv1=127.0.01&permissions=1&description=description+added - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '73' - Content-Type: - - application/x-www-form-urlencoded - User-Agent: - - python-requests/2.24.0 - method: PATCH - uri: https://ipam.example.org/api/ansible/tools/nameservers/61 - response: - body: - string: !!binary | - H4sIAAAAAAAAAw3KMQqAMAxG4auUfy4SHBx6m5oGsVArTeoi3t1sH7z3gnsRpJUoQiezqCLZmBLR - 3PnwiCu7ZTwyNPS9CluYd8kmBRF2Nn9oIdq+H8lOfmtPAAAA - headers: - Cache-Control: - - no-cache - Connection: - - Keep-Alive - Content-Encoding: - - gzip - Content-Type: - - application/json; charset=utf-8 - Date: - - Wed, 04 Nov 2020 13:39:19 GMT - Expires: - - Thu, 19 Nov 1981 08:52:00 GMT - Keep-Alive: - - timeout=5, max=100 - Pragma: - - no-cache - Server: - - Apache/2.4.37 (centos) OpenSSL/1.1.1c - Set-Cookie: - - phpipam=usaqfp7b3dfj8na4qjflead40v; expires=Thu, 05-Nov-2020 13:39:19 GMT; - Max-Age=86400; path=/; HttpOnly - Transfer-Encoding: - - chunked - Vary: - - Accept-Encoding - X-Powered-By: - - PHP/7.2.24 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python-requests/2.24.0 - method: GET - uri: https://ipam.example.org/api/ansible/tools/nameservers/?filter_by=name&filter_value=my+dns - response: - body: - string: !!binary | - H4sIAAAAAAAAA02NuwrDMAxFfyVodoLkhpZ47l+UDsbS4CEPLKcQQv69MnToeI/O1T0hrSwQPKID - 3VMSVQi17OKAY40QXidkhgB3AgdLnE2G+eh40V/W8iFj5B8DDtgsFk0lbzWvix3+UheZhc3YpMxZ - 1ZC2qhHhXJ+xtu8ePfZEPY4djeE2BZrgejuouY3bBo7XFxEdJfy4AAAA - headers: - Cache-Control: - - no-cache - Connection: - - Keep-Alive - Content-Encoding: - - gzip - Content-Type: - - application/json; charset=utf-8 - Date: - - Wed, 04 Nov 2020 13:39:19 GMT - Expires: - - Thu, 19 Nov 1981 08:52:00 GMT - Keep-Alive: - - timeout=5, max=100 - Pragma: - - no-cache - Server: - - Apache/2.4.37 (centos) OpenSSL/1.1.1c - Set-Cookie: - - phpipam=qn56s4bbgf21um64qihae9of7q; expires=Thu, 05-Nov-2020 13:39:19 GMT; - Max-Age=86400; path=/; HttpOnly - Transfer-Encoding: - - chunked - Vary: - - Accept-Encoding - X-Powered-By: - - PHP/7.2.24 - status: - code: 200 - message: OK -version: 1 diff --git a/tests/fixtures/test_update_section.yml b/tests/fixtures/test_update_section.yml deleted file mode 100644 index 1812841..0000000 --- a/tests/fixtures/test_update_section.yml +++ /dev/null @@ -1,158 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python-requests/2.24.0 - method: GET - uri: https://ipam.example.org/api/ansible/sections/foobar - response: - body: - string: !!binary | - H4sIAAAAAAAAA02PzWrEIBRGX6V8aykms3NXGLpqp9BAV24cvW2FRAevMpSQd6/aBLoRz+H+fHeF - jY6gRikFuFhLzFA5FRJwJhuoFd5BYRglBIJZajE+Y7yaVNkR2+Rv2cdQdaD7A5PtJLAYzpSmnRVa - /43S4pmrqFuwapw0lMagITTG/q/vVis5J2/zaw+HoYlyDZTfkqPkwxdUKPMsEBsfQM7ns8l0MH/H - +9TbjhlVfLw8XfY0Hd+f/9FUasK2Jsw/uz5fpr95m0D27Xz5KOVp+wVsLmGDOgEAAA== - headers: - Cache-Control: - - no-cache - Connection: - - Keep-Alive - Content-Encoding: - - gzip - Content-Type: - - application/json; charset=utf-8 - Date: - - Wed, 04 Nov 2020 13:39:20 GMT - Expires: - - Thu, 19 Nov 1981 08:52:00 GMT - Keep-Alive: - - timeout=5, max=100 - Pragma: - - no-cache - Server: - - Apache/2.4.37 (centos) OpenSSL/1.1.1c - Set-Cookie: - - phpipam=r321svks2vfkrcsv5c95hvd8n0; expires=Thu, 05-Nov-2020 13:39:20 GMT; - Max-Age=86400; path=/; HttpOnly - Transfer-Encoding: - - chunked - Vary: - - Accept-Encoding - X-Powered-By: - - PHP/7.2.24 - status: - code: 200 - message: OK -- request: - body: name=foobar&description=new+description&permissions=%7B%223%22%3A%221%22%2C%222%22%3A%222%22%7D - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '95' - Content-Type: - - application/x-www-form-urlencoded - User-Agent: - - python-requests/2.24.0 - method: PATCH - uri: https://ipam.example.org/api/ansible/sections/120 - response: - body: - string: !!binary | - H4sIAAAAAAAAA6tWSs5PSVWyMjIw0FEqLk1OTi0uVrIqKSpN1VEqycwFyhjoGRhY1AIAVf65UCgA - AAA= - headers: - Cache-Control: - - no-cache - Connection: - - Keep-Alive - Content-Encoding: - - gzip - Content-Type: - - application/json; charset=utf-8 - Date: - - Wed, 04 Nov 2020 13:39:20 GMT - Expires: - - Thu, 19 Nov 1981 08:52:00 GMT - Keep-Alive: - - timeout=5, max=100 - Pragma: - - no-cache - Server: - - Apache/2.4.37 (centos) OpenSSL/1.1.1c - Set-Cookie: - - phpipam=415jp3h1tfelf091m2lr8h9f0e; expires=Thu, 05-Nov-2020 13:39:20 GMT; - Max-Age=86400; path=/; HttpOnly - Transfer-Encoding: - - chunked - Vary: - - Accept-Encoding - X-Powered-By: - - PHP/7.2.24 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python-requests/2.24.0 - method: GET - uri: https://ipam.example.org/api/ansible/sections/foobar - response: - body: - string: !!binary | - H4sIAAAAAAAAA02QT2sDIRTEv0qYsym6m0u9FUJPaQpd6GkvRl9bYVeDfwhl2e9etRvIRZwfz5l5 - LtDeEGTHOUPMWlOMkClkYjAqKcgF1kBCdBwMTs1lGF/eX1Qo2lDUwV6T9a5gR7fdI2GYVUwUBtLb - RPW4UphtjAWUJCwj+hFyhBjBRnTtXs61TMYUrE5vrSBEBfniKL0HQ8G6b0iXp4nBV30XZGw6qlRf - dLzjeyH2/LATB9k/y7ZC/PG3ofncTQv4PL2ct3pNfrw+qCGXyjXXTb8bPp6H/8CVIdn6J/yJ8379 - A+B1YcBPAQAA - headers: - Cache-Control: - - no-cache - Connection: - - Keep-Alive - Content-Encoding: - - gzip - Content-Type: - - application/json; charset=utf-8 - Date: - - Wed, 04 Nov 2020 13:39:21 GMT - Expires: - - Thu, 19 Nov 1981 08:52:00 GMT - Keep-Alive: - - timeout=5, max=100 - Pragma: - - no-cache - Server: - - Apache/2.4.37 (centos) OpenSSL/1.1.1c - Set-Cookie: - - phpipam=8j6dnkrlrd2h5daevlpfgno2cq; expires=Thu, 05-Nov-2020 13:39:21 GMT; - Max-Age=86400; path=/; HttpOnly - Transfer-Encoding: - - chunked - Vary: - - Accept-Encoding - X-Powered-By: - - PHP/7.2.24 - status: - code: 200 - message: OK -version: 1 diff --git a/tests/fixtures/test_update_vlan.yml b/tests/fixtures/test_update_vlan.yml deleted file mode 100644 index eead033..0000000 --- a/tests/fixtures/test_update_vlan.yml +++ /dev/null @@ -1,155 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python-requests/2.24.0 - method: GET - uri: https://ipam.example.org/api/ansible/vlan/?filter_by=name&filter_value=my+vlan - response: - body: - string: !!binary | - H4sIAAAAAAAAAzWMywpCIRRFfyX2WMKSChw36Rsi4qRnIPgIPQZxuf+ecmm41n4scMUz7FFrhdad - 49ZgpXZW8CQEe1/wiZRvHhanM4YuicLGh4GZ0tgjfXezNkVPL64zNeYy+9xcDW8JJcPmHqMC+yBX - Ev6z601K4voMflPrQ0HCPNZ7rc36A8HHFdqnAAAA - headers: - Cache-Control: - - no-cache - Connection: - - Keep-Alive - Content-Encoding: - - gzip - Content-Type: - - application/json; charset=utf-8 - Date: - - Wed, 04 Nov 2020 13:39:22 GMT - Expires: - - Thu, 19 Nov 1981 08:52:00 GMT - Keep-Alive: - - timeout=5, max=100 - Pragma: - - no-cache - Server: - - Apache/2.4.37 (centos) OpenSSL/1.1.1c - Set-Cookie: - - phpipam=sghlrtapkemj4kunholta7eb0e; expires=Thu, 05-Nov-2020 13:39:22 GMT; - Max-Age=86400; path=/; HttpOnly - Transfer-Encoding: - - chunked - Vary: - - Accept-Encoding - X-Powered-By: - - PHP/7.2.24 - status: - code: 200 - message: OK -- request: - body: name=my+vlan&number=1337&vlanId=56&description=description+added - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '64' - Content-Type: - - application/x-www-form-urlencoded - User-Agent: - - python-requests/2.24.0 - method: PATCH - uri: https://ipam.example.org/api/ansible/vlan/56 - response: - body: - string: !!binary | - H4sIAAAAAAAAA6tWSs5PSVWyMjIw0FEqLk1OTi0uVrIqKSpN1VHKBbIT04GSSmE5iXkKpQUpiSWp - KUo6SiWZuUBRAz0DA7NaAPRNw1NBAAAA - headers: - Cache-Control: - - no-cache - Connection: - - Keep-Alive - Content-Encoding: - - gzip - Content-Type: - - application/json; charset=utf-8 - Date: - - Wed, 04 Nov 2020 13:39:22 GMT - Expires: - - Thu, 19 Nov 1981 08:52:00 GMT - Keep-Alive: - - timeout=5, max=100 - Pragma: - - no-cache - Server: - - Apache/2.4.37 (centos) OpenSSL/1.1.1c - Set-Cookie: - - phpipam=k3qf80i0hqkm6dulhc4qp4308r; expires=Thu, 05-Nov-2020 13:39:22 GMT; - Max-Age=86400; path=/; HttpOnly - Transfer-Encoding: - - chunked - Vary: - - Accept-Encoding - X-Powered-By: - - PHP/7.2.24 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python-requests/2.24.0 - method: GET - uri: https://ipam.example.org/api/ansible/vlan/?filter_by=name&filter_value=my+vlan - response: - body: - string: !!binary | - H4sIAAAAAAAAA02NywrCMBBFf6XMupVJUhWz7sZvEJGYzCLQJJKHIKX/7gQ3Lu+Zc+duYJMj0BJx - hNKspVJA19xoBGeqAX3b4L2aeHWg4XgCxikY/8uCYzSB+xA+Q9c6aOFJuV+VOnefis3+VX2KDP/S - YJwjxwY5XxdT+xuJEichJpwHMWt10VKyYFupKVB+eF6NbV33+wjV92E8IKr9Cz8ztxHHAAAA - headers: - Cache-Control: - - no-cache - Connection: - - Keep-Alive - Content-Encoding: - - gzip - Content-Type: - - application/json; charset=utf-8 - Date: - - Wed, 04 Nov 2020 13:39:22 GMT - Expires: - - Thu, 19 Nov 1981 08:52:00 GMT - Keep-Alive: - - timeout=5, max=100 - Pragma: - - no-cache - Server: - - Apache/2.4.37 (centos) OpenSSL/1.1.1c - Set-Cookie: - - phpipam=jjkpb1ph3v58fb2gl84154mhu0; expires=Thu, 05-Nov-2020 13:39:22 GMT; - Max-Age=86400; path=/; HttpOnly - Transfer-Encoding: - - chunked - Vary: - - Accept-Encoding - X-Powered-By: - - PHP/7.2.24 - status: - code: 200 - message: OK -version: 1 diff --git a/tests/test_cases/api_connection.py b/tests/test_cases/api_connection.py index fe3978b..472f500 100755 --- a/tests/test_cases/api_connection.py +++ b/tests/test_cases/api_connection.py @@ -1,10 +1,8 @@ """Tests to check connection to API.""" import phpypam import pytest -import vcr import yaml -from tests.conftest import filter_request_uri, filter_response, cassette_name, FILTER_REQUEST_HEADERS from phpypam.core.exceptions import PHPyPAMInvalidCredentials @@ -12,11 +10,6 @@ server = yaml.safe_load(c) -@vcr.use_cassette(cassette_name('test_connection_success'), - filter_headers=FILTER_REQUEST_HEADERS, - before_record_request=filter_request_uri, - before_recorde_response=filter_response - ) def test_connection_success(): """Test whether a connection to API can be done.""" pi = phpypam.api(**server) @@ -27,11 +20,6 @@ def test_connection_success(): assert len(token) == 24 -@vcr.use_cassette(cassette_name('test_connection_failure'), - filter_headers=FILTER_REQUEST_HEADERS, - before_record_request=filter_request_uri, - before_recorde_response=filter_response - ) def test_connection_failure(): """Test faulty connection. @@ -48,11 +36,6 @@ def test_connection_failure(): pytest.raises(PHPyPAMInvalidCredentials, phpypam.api, **connection_kwargs) -@vcr.use_cassette(cassette_name('test_custom_user_agent'), - filter_headers=FILTER_REQUEST_HEADERS, - before_record_request=filter_request_uri, - before_recorde_response=filter_response - ) def test_custom_user_agent(): """Test to set custom user-agent header. diff --git a/tests/test_cases/controllers.py b/tests/test_cases/controllers.py index 31ae5f7..3ef53b5 100644 --- a/tests/test_cases/controllers.py +++ b/tests/test_cases/controllers.py @@ -1,14 +1,6 @@ """Test controller method.""" -import vcr -from tests.conftest import filter_request_uri, filter_response, cassette_name, FILTER_REQUEST_HEADERS - -@vcr.use_cassette(cassette_name('test_controllers'), - filter_headers=FILTER_REQUEST_HEADERS, - before_record_request=filter_request_uri, - before_recorde_response=filter_response - ) def test_controllers(pi): """Test if controllers method returns correct datatype.""" controllers = pi.controllers() diff --git a/tests/test_cases/ensure_nameserver.py b/tests/test_cases/ensure_nameserver.py index 10a1561..212a35f 100755 --- a/tests/test_cases/ensure_nameserver.py +++ b/tests/test_cases/ensure_nameserver.py @@ -1,12 +1,10 @@ """Tests to check funtionallity of section handling.""" import pytest -import vcr import yaml with open('tests/vars/server.yml') as c: server = yaml.safe_load(c) -from tests.conftest import filter_request_uri, filter_response, cassette_name, FILTER_REQUEST_HEADERS from phpypam import PHPyPAMEntityNotFoundException @@ -17,11 +15,6 @@ ) -@vcr.use_cassette(cassette_name('test_create_nameserver'), - filter_headers=FILTER_REQUEST_HEADERS, - before_record_request=filter_request_uri, - before_recorde_response=filter_response - ) def test_create_nameserver(pi): """Test to create a new nameserver. @@ -36,11 +29,6 @@ def test_create_nameserver(pi): assert entity is not None -@vcr.use_cassette(cassette_name('test_update_nameserver'), - filter_headers=FILTER_REQUEST_HEADERS, - before_record_request=filter_request_uri, - before_recorde_response=filter_response - ) def test_update_nameserver(pi): """Test to update an existing nameserver. @@ -56,11 +44,6 @@ def test_update_nameserver(pi): assert entity[0]['description'] == my_nameserver['description'] -@vcr.use_cassette(cassette_name('test_delete_nameserver'), - filter_headers=FILTER_REQUEST_HEADERS, - before_record_request=filter_request_uri, - before_recorde_response=filter_response - ) def test_delete_nameserver(pi): """Test to delete an existing nameserver. diff --git a/tests/test_cases/ensure_section.py b/tests/test_cases/ensure_section.py index 877a322..74c8582 100755 --- a/tests/test_cases/ensure_section.py +++ b/tests/test_cases/ensure_section.py @@ -1,9 +1,7 @@ """Tests to check funtionallity of section handling.""" import pytest -import vcr import yaml -from tests.conftest import filter_request_uri, filter_response, cassette_name, FILTER_REQUEST_HEADERS from phpypam import PHPyPAMEntityNotFoundException @@ -17,11 +15,6 @@ ) -@vcr.use_cassette(cassette_name('test_create_section'), - filter_headers=FILTER_REQUEST_HEADERS, - before_record_request=filter_request_uri, - before_recorde_response=filter_response - ) def test_create_section(pi): """Test to create a new section. @@ -37,11 +30,6 @@ def test_create_section(pi): assert entity is not None -@vcr.use_cassette(cassette_name('test_update_section'), - filter_headers=FILTER_REQUEST_HEADERS, - before_record_request=filter_request_uri, - before_recorde_response=filter_response - ) def test_update_section(pi): """Test to update an existing section. @@ -56,11 +44,6 @@ def test_update_section(pi): assert entity['description'] == my_section['description'] -@vcr.use_cassette(cassette_name('test_delete_section'), - filter_headers=FILTER_REQUEST_HEADERS, - before_record_request=filter_request_uri, - before_recorde_response=filter_response - ) def test_delete_section(pi): """Test to delete an existing section. diff --git a/tests/test_cases/ensure_vlan.py b/tests/test_cases/ensure_vlan.py index 340827d..28f72d2 100755 --- a/tests/test_cases/ensure_vlan.py +++ b/tests/test_cases/ensure_vlan.py @@ -1,9 +1,7 @@ """Tests to check funtionallity of vlan handling.""" import pytest -import vcr import yaml -from tests.conftest import filter_request_uri, filter_response, cassette_name, FILTER_REQUEST_HEADERS from phpypam import PHPyPAMEntityNotFoundException @@ -16,11 +14,6 @@ ) -@vcr.use_cassette(cassette_name('test_create_vlan'), - filter_headers=FILTER_REQUEST_HEADERS, - before_record_request=filter_request_uri, - before_recorde_response=filter_response - ) def test_create_vlan(pi): """Test to create a new vlan. @@ -35,11 +28,6 @@ def test_create_vlan(pi): assert entity is not None -@vcr.use_cassette(cassette_name('test_update_vlan'), - filter_headers=FILTER_REQUEST_HEADERS, - before_record_request=filter_request_uri, - before_recorde_response=filter_response - ) def test_update_vlan(pi): """Test to update an existing vlan. @@ -58,11 +46,6 @@ def test_update_vlan(pi): assert entity[0]['description'] == my_vlan['description'] -@vcr.use_cassette(cassette_name('test_delete_vlan'), - filter_headers=FILTER_REQUEST_HEADERS, - before_record_request=filter_request_uri, - before_recorde_response=filter_response - ) def test_delete_vlan(pi): """Test to delete an existing vlan. diff --git a/tests/test_cases/force_exceptions.py b/tests/test_cases/force_exceptions.py index 8e30068..9c26bf0 100644 --- a/tests/test_cases/force_exceptions.py +++ b/tests/test_cases/force_exceptions.py @@ -1,10 +1,8 @@ """Test exceptions.""" import phpypam import pytest -import vcr import yaml -from tests.conftest import filter_request_uri, filter_response, cassette_name, FILTER_REQUEST_HEADERS from phpypam.core.exceptions import PHPyPAMEntityNotFoundException, PHPyPAMInvalidCredentials, PHPyPAMInvalidSyntax @@ -12,11 +10,6 @@ server = yaml.safe_load(c) -@vcr.use_cassette(cassette_name('test_invalid_syntax_exception'), - filter_headers=FILTER_REQUEST_HEADERS, - before_record_request=filter_request_uri, - before_recorde_response=filter_response - ) def test_invalid_syntax_exception(): """Test invalid syntax exception. @@ -29,11 +22,6 @@ def test_invalid_syntax_exception(): phpypam.api(**connection_kwargs) -@vcr.use_cassette(cassette_name('test_invalid_credentials_exception'), - filter_headers=FILTER_REQUEST_HEADERS, - before_record_request=filter_request_uri, - before_recorde_response=filter_response - ) def test_invalid_credentials_exception(): """Test invalid credentials exception. @@ -49,11 +37,6 @@ def test_invalid_credentials_exception(): phpypam.api(**connection_kwargs) -@vcr.use_cassette(cassette_name('test_entity_not_found_exception'), - filter_headers=FILTER_REQUEST_HEADERS, - before_record_request=filter_request_uri, - before_recorde_response=filter_response - ) def test_entity_not_found_execption(pi): """Test not found execption on empty subnet. diff --git a/tests/test_cases/search_address.py b/tests/test_cases/search_address.py index 8b71242..437fbe2 100755 --- a/tests/test_cases/search_address.py +++ b/tests/test_cases/search_address.py @@ -1,9 +1,7 @@ """Test search for address.""" import pytest -import vcr import yaml -from tests.conftest import filter_request_uri, filter_response, cassette_name, FILTER_REQUEST_HEADERS from phpypam import PHPyPAMEntityNotFoundException @@ -11,11 +9,6 @@ server = yaml.safe_load(c) -@vcr.use_cassette(cassette_name('test_address_not_found'), - filter_headers=FILTER_REQUEST_HEADERS, - before_record_request=filter_request_uri, - before_recorde_response=filter_response - ) def test_address_not_found(pi): """Test address not found execption.""" addr = '10.10.0.4' diff --git a/tests/test_cases/search_exceptions.py b/tests/test_cases/search_exceptions.py index cfcaeda..1c4576e 100644 --- a/tests/test_cases/search_exceptions.py +++ b/tests/test_cases/search_exceptions.py @@ -1,10 +1,8 @@ """Test exceptions.""" import phpypam import pytest -import vcr import yaml -from tests.conftest import filter_request_uri, filter_response, cassette_name, FILTER_REQUEST_HEADERS from phpypam.core.exceptions import PHPyPAMException, PHPyPAMEntityNotFoundException @@ -15,19 +13,12 @@ not_found_cases = yaml.safe_load(config)['not_found_cases'] -@vcr.use_cassette(cassette_name('test_entity_not_found_exception'), - filter_headers=FILTER_REQUEST_HEADERS, - before_record_request=filter_request_uri, - before_recorde_response=filter_response, - record_mode='rewrite' - ) @pytest.mark.parametrize('case', not_found_cases) def test_entity_not_found_exception(case): """Test entity not found exception. Test if PHPyPAMEntityNotFound exception is fired corretly for all cases. """ - pi = phpypam.api(**connection_params) # check whether PHPyPAMEntityNotFoundException is raised diff --git a/tests/test_cases/search_section_by_name.py b/tests/test_cases/search_section_by_name.py index 0f9088c..b047f15 100755 --- a/tests/test_cases/search_section_by_name.py +++ b/tests/test_cases/search_section_by_name.py @@ -1,9 +1,7 @@ """Tests to check section search via url parameters.""" import pytest -import vcr import yaml -from tests.conftest import filter_request_uri, filter_response, cassette_name, FILTER_REQUEST_HEADERS from phpypam import PHPyPAMEntityNotFoundException @@ -11,11 +9,6 @@ server = yaml.safe_load(c) -@vcr.use_cassette(cassette_name('test_search_not_existing_section'), - filter_headers=FILTER_REQUEST_HEADERS, - before_record_request=filter_request_uri, - before_recorde_response=filter_response - ) def test_search_not_existing_section(pi): """Search for non existing section. @@ -26,11 +19,6 @@ def test_search_not_existing_section(pi): pytest.raises(PHPyPAMEntityNotFoundException, pi.get_entity, **search_kwargs) -@vcr.use_cassette(cassette_name('test_search_existing_section'), - filter_headers=FILTER_REQUEST_HEADERS, - before_record_request=filter_request_uri, - before_recorde_response=filter_response - ) def test_search_existing_section(pi): """Search for existing section. diff --git a/tests/test_cases/search_subnet.py b/tests/test_cases/search_subnet.py index 8f9b566..fbd6f2e 100644 --- a/tests/test_cases/search_subnet.py +++ b/tests/test_cases/search_subnet.py @@ -1,9 +1,7 @@ """Test search for subnet.""" import pytest -import vcr import yaml -from tests.conftest import filter_request_uri, filter_response, cassette_name, FILTER_REQUEST_HEADERS from phpypam import PHPyPAMEntityNotFoundException @@ -11,11 +9,6 @@ server = yaml.safe_load(c) -@vcr.use_cassette(cassette_name('test_subnet_not_found'), - filter_headers=FILTER_REQUEST_HEADERS, - before_record_request=filter_request_uri, - before_recorde_response=filter_response - ) def test_subnet_not_found(pi): """Test subnet not found exeption.""" cidr = '10.0.0.0/24'