Implement naive reverseOrder option for SWF's ListDomains endpoint
This commit is contained in:
parent
3e2c7dec83
commit
cb46eac513
3 changed files with 33 additions and 6 deletions
|
|
@ -12,7 +12,6 @@ from moto.swf.exceptions import (
|
|||
|
||||
|
||||
# RegisterDomain endpoint
|
||||
# ListDomain endpoint
|
||||
@mock_swf
|
||||
def test_register_domain():
|
||||
conn = boto.connect_swf("the_key", "the_secret")
|
||||
|
|
@ -57,6 +56,30 @@ def test_register_with_wrong_parameter_type():
|
|||
})
|
||||
|
||||
|
||||
# ListDomain endpoint
|
||||
@mock_swf
|
||||
def test_list_domains_order():
|
||||
conn = boto.connect_swf("the_key", "the_secret")
|
||||
conn.register_domain("b-test-domain", "60")
|
||||
conn.register_domain("a-test-domain", "60")
|
||||
conn.register_domain("c-test-domain", "60")
|
||||
|
||||
all_domains = conn.list_domains("REGISTERED")
|
||||
names = [domain["name"] for domain in all_domains["domainInfos"]]
|
||||
names.should.equal(["a-test-domain", "b-test-domain", "c-test-domain"])
|
||||
|
||||
@mock_swf
|
||||
def test_list_domains_reverse_order():
|
||||
conn = boto.connect_swf("the_key", "the_secret")
|
||||
conn.register_domain("b-test-domain", "60")
|
||||
conn.register_domain("a-test-domain", "60")
|
||||
conn.register_domain("c-test-domain", "60")
|
||||
|
||||
all_domains = conn.list_domains("REGISTERED", reverse_order=True)
|
||||
names = [domain["name"] for domain in all_domains["domainInfos"]]
|
||||
names.should.equal(["c-test-domain", "b-test-domain", "a-test-domain"])
|
||||
|
||||
|
||||
# DeprecateDomain endpoint
|
||||
@mock_swf
|
||||
def test_deprecate_domain():
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue