Fix style issues
This commit is contained in:
parent
ac4ce7d53f
commit
129b4faff8
21 changed files with 244 additions and 163 deletions
|
|
@ -1,12 +1,10 @@
|
|||
from collections import namedtuple
|
||||
from sure import expect
|
||||
|
||||
from moto.swf.exceptions import SWFUnknownResourceFault
|
||||
from moto.swf.models import Domain
|
||||
|
||||
# Ensure 'assert_raises' context manager support for Python 2.6
|
||||
import tests.backport_assert_raises # noqa
|
||||
from nose.tools import assert_raises
|
||||
|
||||
# Fake WorkflowExecution for tests purposes
|
||||
WorkflowExecution = namedtuple(
|
||||
|
|
@ -17,11 +15,12 @@ WorkflowExecution = namedtuple(
|
|||
|
||||
def test_domain_short_dict_representation():
|
||||
domain = Domain("foo", "52")
|
||||
domain.to_short_dict().should.equal({"name":"foo", "status":"REGISTERED"})
|
||||
domain.to_short_dict().should.equal({"name": "foo", "status": "REGISTERED"})
|
||||
|
||||
domain.description = "foo bar"
|
||||
domain.to_short_dict()["description"].should.equal("foo bar")
|
||||
|
||||
|
||||
def test_domain_full_dict_representation():
|
||||
domain = Domain("foo", "52")
|
||||
|
||||
|
|
@ -29,10 +28,12 @@ def test_domain_full_dict_representation():
|
|||
_config = domain.to_full_dict()["configuration"]
|
||||
_config["workflowExecutionRetentionPeriodInDays"].should.equal("52")
|
||||
|
||||
|
||||
def test_domain_string_representation():
|
||||
domain = Domain("my-domain", "60")
|
||||
str(domain).should.equal("Domain(name: my-domain, status: REGISTERED)")
|
||||
|
||||
|
||||
def test_domain_add_to_activity_task_list():
|
||||
domain = Domain("my-domain", "60")
|
||||
domain.add_to_activity_task_list("foo", "bar")
|
||||
|
|
@ -40,12 +41,14 @@ def test_domain_add_to_activity_task_list():
|
|||
"foo": ["bar"]
|
||||
})
|
||||
|
||||
|
||||
def test_domain_activity_tasks():
|
||||
domain = Domain("my-domain", "60")
|
||||
domain.add_to_activity_task_list("foo", "bar")
|
||||
domain.add_to_activity_task_list("other", "baz")
|
||||
sorted(domain.activity_tasks).should.equal(["bar", "baz"])
|
||||
|
||||
|
||||
def test_domain_add_to_decision_task_list():
|
||||
domain = Domain("my-domain", "60")
|
||||
domain.add_to_decision_task_list("foo", "bar")
|
||||
|
|
@ -53,12 +56,14 @@ def test_domain_add_to_decision_task_list():
|
|||
"foo": ["bar"]
|
||||
})
|
||||
|
||||
|
||||
def test_domain_decision_tasks():
|
||||
domain = Domain("my-domain", "60")
|
||||
domain.add_to_decision_task_list("foo", "bar")
|
||||
domain.add_to_decision_task_list("other", "baz")
|
||||
sorted(domain.decision_tasks).should.equal(["bar", "baz"])
|
||||
|
||||
|
||||
def test_domain_get_workflow_execution():
|
||||
domain = Domain("my-domain", "60")
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue