File: test_std.py

package info (click to toggle)
python-consul 1.6.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 484 kB
  • sloc: python: 2,858; makefile: 197
file content (10 lines) | stat: -rw-r--r-- 312 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
import consul
import consul.check
import consul.std


class TestHTTPClient:
    def test_uri(self) -> None:
        http = consul.std.HTTPClient()
        assert http.uri("/v1/kv") == "http://127.0.0.1:8500/v1/kv"
        assert http.uri("/v1/kv", params=[("index", 1)]) == "http://127.0.0.1:8500/v1/kv?index=1"