diff options
author | 2018-02-12 11:21:47 +0100 | |
---|---|---|
committer | 2018-02-16 13:56:56 +0100 | |
commit | 4bf344a003f550369511e5c3600b2600101cc8b7 (patch) | |
tree | 6ee1a5b74cf14df49e90b0967503f48d94fa6e7a /python_moonclient/tests/unit_python/conf/conf_projects.py | |
parent | 9da7ac6718d66b73ba7fc8fc70e656a70e4db766 (diff) |
Use cliff for the moonclient cli
Change-Id: I85f9fe24037a3bd28ed069667e5e0c7fe482c2a7
Diffstat (limited to 'python_moonclient/tests/unit_python/conf/conf_projects.py')
-rw-r--r-- | python_moonclient/tests/unit_python/conf/conf_projects.py | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/python_moonclient/tests/unit_python/conf/conf_projects.py b/python_moonclient/tests/unit_python/conf/conf_projects.py new file mode 100644 index 00000000..63be05e0 --- /dev/null +++ b/python_moonclient/tests/unit_python/conf/conf_projects.py @@ -0,0 +1,44 @@ + + +PROJECTS = { + "projects": [ + { + "is_domain": False, + "description": None, + "domain_id": "admin", + "enabled": True, + "id": "0c4e939acacf4376bdcd1129f1a054ad", + "links": { + "self": "http://example.com/identity/v3/projects/0c4e939acacf4376bdcd1129f1a054ad" + }, + "name": "admin", + "parent_id": None, + "tags": [] + }, + { + "is_domain": False, + "description": None, + "domain_id": "default", + "enabled": True, + "id": "0cbd49cbf76d405d9c86562e1d579bd3", + "links": { + "self": "http://example.com/identity/v3/projects/0cbd49cbf76d405d9c86562e1d579bd3" + }, + "name": "demo", + "parent_id": None, + "tags": [] + } + ] +} + + +def conf_projects(m): + m.register_uri( + 'GET', 'http://keystone:5000/v3/projects', + headers={'X-Subject-Token': "111111111"}, + json=PROJECTS + ) + m.register_uri( + 'POST', 'http://keystone:5000/v3/auth/tokens', + headers={'X-Subject-Token': "111111111"} + ) |