@@ -132,7 +132,27 @@ def test_separate_default_client_instances(self):
132
132
133
133
self .assertNotEqual (pet_api .api_client .user_agent , pet_api2 .api_client .user_agent )
134
134
135
- def test_separate_default_config_instances (self ):
135
+ def test_default_config (self ):
136
+ default = Configuration ()
137
+ default .host = 'default_host'
138
+ default .api_key ['api_key' ] = 'default_key'
139
+ default .api_key_prefix ['prefix' ] = 'default_prefix'
140
+ Configuration .set_default (default )
141
+
142
+ configuration = Configuration ()
143
+ self .assertIsNot (configuration , default )
144
+ self .assertEqual (configuration .host , default .host )
145
+ self .assertEqual (configuration .api_key ['api_key' ], default .api_key ['api_key' ])
146
+ self .assertEqual (configuration .api_key_prefix ['prefix' ], default .api_key_prefix ['prefix' ])
147
+
148
+ configuration .host = 'some_host'
149
+ configuration .api_key ['api_key' ] = 'some_key'
150
+ configuration .api_key_prefix ['prefix' ] = 'some_prefix'
151
+ self .assertEqual (default .host , 'default_host' )
152
+ self .assertEqual (default .api_key ['api_key' ], 'default_key' )
153
+ self .assertEqual (default .api_key_prefix ['prefix' ], 'default_prefix' )
154
+
155
+ def test_separate_config_instances (self ):
136
156
pet_api = petstore_api .PetApi ()
137
157
pet_api2 = petstore_api .PetApi ()
138
158
self .assertNotEqual (pet_api .api_client .configuration , pet_api2 .api_client .configuration )
0 commit comments