mirror of https://github.com/pallets/flask.git
				
				
				
			add tests for trim_namespace argument of app.config.get_namespace
This commit is contained in:
		
							parent
							
								
									bbd9c2f100
								
							
						
					
					
						commit
						5e8d503098
					
				|  | @ -182,3 +182,11 @@ def test_get_namespace(): | |||
|     assert 2 == len(bar_options) | ||||
|     assert 'bar stuff 1' == bar_options['STUFF_1'] | ||||
|     assert 'bar stuff 2' == bar_options['STUFF_2'] | ||||
|     foo_options = app.config.get_namespace('FOO_', trim_namespace=False) | ||||
|     assert 2 == len(foo_options) | ||||
|     assert 'foo option 1' == foo_options['foo_option_1'] | ||||
|     assert 'foo option 2' == foo_options['foo_option_2'] | ||||
|     bar_options = app.config.get_namespace('BAR_', lowercase=False, trim_namespace=False) | ||||
|     assert 2 == len(bar_options) | ||||
|     assert 'bar stuff 1' == bar_options['BAR_STUFF_1'] | ||||
|     assert 'bar stuff 2' == bar_options['BAR_STUFF_2'] | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue