MCPcopy Index your code
hub / github.com/aws/aws-cli / setUp

Method setUp

tests/unit/botocore/test_errorfactory.py:50–92  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

48
49class TestClientExceptionsFactory(unittest.TestCase):
50 def setUp(self):
51 self.model = {
52 "metadata": {
53 'endpointPrefix': 'myservice',
54 'serviceFullName': 'MyService',
55 },
56 'operations': {
57 'OperationName': {
58 'name': 'OperationName',
59 'errors': [
60 {'shape': 'ExceptionMissingCode'},
61 {'shape': 'ExceptionWithModeledCode'},
62 ],
63 },
64 'AnotherOperationName': {
65 'name': 'AnotherOperationName',
66 'errors': [
67 {'shape': 'ExceptionForAnotherOperation'},
68 {'shape': 'ExceptionWithModeledCode'},
69 ],
70 },
71 },
72 'shapes': {
73 'ExceptionWithModeledCode': {
74 'type': 'structure',
75 'members': {},
76 'error': {'code': 'ModeledCode'},
77 'exception': True,
78 },
79 'ExceptionMissingCode': {
80 'type': 'structure',
81 'members': {},
82 'exception': True,
83 },
84 'ExceptionForAnotherOperation': {
85 'type': 'structure',
86 'members': {},
87 'exception': True,
88 },
89 },
90 }
91 self.service_model = ServiceModel(self.model)
92 self.exceptions_factory = ClientExceptionsFactory()
93
94 def test_class_name(self):
95 exceptions = self.exceptions_factory.create_client_exceptions(

Callers

nothing calls this directly

Calls 2

ServiceModelClass · 0.90

Tested by

no test coverage detected