How to use list_activity_types method in localstack

Best Python code snippet using localstack_python

aws_swf_info.py

Source:aws_swf_info.py Github

copy

Full Screen

...93 domain=module.params['domain'],94 registrationStatus=module.params['registration_status'],95 ), True96 else:97 return client.list_activity_types(98 domain=module.params['domain'],99 registrationStatus=module.params['registration_status'],100 ), False101 elif module.params['list_domains']:102 if client.can_paginate('list_domains'):103 paginator = client.get_paginator('list_domains')104 return paginator.paginate(105 registrationStatus=module.params['registration_status'],106 ), True107 else:108 return client.list_domains(109 registrationStatus=module.params['registration_status'],110 ), False111 elif module.params['list_workflow_types']:...

Full Screen

Full Screen

test_activity_types.py

Source:test_activity_types.py Github

copy

Full Screen

...7def test_register_activity_type():8 conn = boto.connect_swf("the_key", "the_secret")9 conn.register_domain("test-domain", "60")10 conn.register_activity_type("test-domain", "test-activity", "v1.0")11 types = conn.list_activity_types("test-domain", "REGISTERED")12 actype = types["typeInfos"][0]13 actype["activityType"]["name"].should.equal("test-activity")14 actype["activityType"]["version"].should.equal("v1.0")15@mock_swf_deprecated16def test_register_already_existing_activity_type():17 conn = boto.connect_swf("the_key", "the_secret")18 conn.register_domain("test-domain", "60")19 conn.register_activity_type("test-domain", "test-activity", "v1.0")20 conn.register_activity_type.when.called_with(21 "test-domain", "test-activity", "v1.0"22 ).should.throw(SWFResponseError)23@mock_swf_deprecated24def test_register_with_wrong_parameter_type():25 conn = boto.connect_swf("the_key", "the_secret")26 conn.register_domain("test-domain", "60")27 conn.register_activity_type.when.called_with(28 "test-domain", "test-activity", 1229 ).should.throw(SWFResponseError)30# ListActivityTypes endpoint31@mock_swf_deprecated32def test_list_activity_types():33 conn = boto.connect_swf("the_key", "the_secret")34 conn.register_domain("test-domain", "60")35 conn.register_activity_type("test-domain", "b-test-activity", "v1.0")36 conn.register_activity_type("test-domain", "a-test-activity", "v1.0")37 conn.register_activity_type("test-domain", "c-test-activity", "v1.0")38 all_activity_types = conn.list_activity_types("test-domain", "REGISTERED")39 names = [activity_type["activityType"]["name"]40 for activity_type in all_activity_types["typeInfos"]]41 names.should.equal(42 ["a-test-activity", "b-test-activity", "c-test-activity"])43@mock_swf_deprecated44def test_list_activity_types_reverse_order():45 conn = boto.connect_swf("the_key", "the_secret")46 conn.register_domain("test-domain", "60")47 conn.register_activity_type("test-domain", "b-test-activity", "v1.0")48 conn.register_activity_type("test-domain", "a-test-activity", "v1.0")49 conn.register_activity_type("test-domain", "c-test-activity", "v1.0")50 all_activity_types = conn.list_activity_types("test-domain", "REGISTERED",51 reverse_order=True)52 names = [activity_type["activityType"]["name"]53 for activity_type in all_activity_types["typeInfos"]]54 names.should.equal(55 ["c-test-activity", "b-test-activity", "a-test-activity"])56# DeprecateActivityType endpoint57@mock_swf_deprecated58def test_deprecate_activity_type():59 conn = boto.connect_swf("the_key", "the_secret")60 conn.register_domain("test-domain", "60")61 conn.register_activity_type("test-domain", "test-activity", "v1.0")62 conn.deprecate_activity_type("test-domain", "test-activity", "v1.0")63 actypes = conn.list_activity_types("test-domain", "DEPRECATED")64 actype = actypes["typeInfos"][0]65 actype["activityType"]["name"].should.equal("test-activity")66 actype["activityType"]["version"].should.equal("v1.0")67@mock_swf_deprecated68def test_deprecate_already_deprecated_activity_type():69 conn = boto.connect_swf("the_key", "the_secret")70 conn.register_domain("test-domain", "60")71 conn.register_activity_type("test-domain", "test-activity", "v1.0")72 conn.deprecate_activity_type("test-domain", "test-activity", "v1.0")73 conn.deprecate_activity_type.when.called_with(74 "test-domain", "test-activity", "v1.0"75 ).should.throw(SWFResponseError)76@mock_swf_deprecated77def test_deprecate_non_existent_activity_type():...

Full Screen

Full Screen

Automation Testing Tutorials

Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.

LambdaTest Learning Hubs:

YouTube

You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.

Run localstack automation tests on LambdaTest cloud grid

Perform automation testing on 3000+ real desktop and mobile devices online.

Try LambdaTest Now !!

Get 100 minutes of automation test minutes FREE!!

Next-Gen App & Browser Testing Cloud

Was this article helpful?

Helpful

NotHelpful