# Path: caravan/tests/util.py
# def mock_args(args):
#     return mock.patch('sys.argv', ['PROG'] + args)
# 
# Path: caravan/commands/domain_register.py
# class Command(BaseCommand):
# 
#     description = 'Register a domain'
#     default_config_section = 'caravan:domain'
# 
#     def setup_arguments(self, parser):
#         parser.add_argument('-n', '--name', required=True)
#         parser.add_argument(
#             '--retention-days',
#             dest='retention_days',
#             required=True,
#             help='Retention period for workflow execution')
#         parser.add_argument('--description')
# 
#     def run(self):
#         run_swf_command(
#             'register_domain',
#             name=self.args.name,
#             workflowExecutionRetentionPeriodInDays=self.args.retention_days,
#             description=self.args.description,
#             )


import json
import unittest
import httpretty
from abduct import captured, out, err
from caravan.tests.util import mock_args
from caravan.commands.domain_register import Command




class Test(unittest.TestCase):

    @httpretty.activate
    def test_nominal(self):
        args = ['--name', 'DOMAIN', '--retention-days', '10']

        headers = {
            'x-amzn-RequestId': 'd68969c7-3f0d-11e1-9b11-7182192d0b57',
            }

# Path: caravan/tests/util.py
# def mock_args(args):
#     return mock.patch('sys.argv', ['PROG'] + args)
# 
# Path: caravan/commands/domain_register.py
# class Command(BaseCommand):
# 
#     description = 'Register a domain'
#     default_config_section = 'caravan:domain'
# 
#     def setup_arguments(self, parser):
#         parser.add_argument('-n', '--name', required=True)
#         parser.add_argument(
#             '--retention-days',
#             dest='retention_days',
#             required=True,
#             help='Retention period for workflow execution')
#         parser.add_argument('--description')
# 
#     def run(self):
#         run_swf_command(
#             'register_domain',
#             name=self.args.name,
#             workflowExecutionRetentionPeriodInDays=self.args.retention_days,
#             description=self.args.description,
#             )


# Path: caravan/tests/commands/test_domain_register.py
import json
import unittest
import httpretty
from abduct import captured, out, err
from caravan.tests.util import mock_args
from caravan.commands.domain_register import Command





class Test(unittest.TestCase):

    @httpretty.activate
    def test_nominal(self):
        args = ['--name', 'DOMAIN', '--retention-days', '10']

        headers = {
            'x-amzn-RequestId': 'd68969c7-3f0d-11e1-9b11-7182192d0b57',
            }

        httpretty.register_uri(httpretty.POST,