mirror of
				https://github.com/ets-labs/python-dependency-injector.git
				synced 2025-11-04 18:07:44 +03:00 
			
		
		
		
	Add extra test
This commit is contained in:
		
							parent
							
								
									2ab4dc9577
								
							
						
					
					
						commit
						5a4f3fdde6
					
				| 
						 | 
				
			
			@ -789,6 +789,14 @@ class ConfigFromPydanticTests(unittest.TestCase):
 | 
			
		|||
        self.assertEqual(self.config.section2(), {'value2': 2})
 | 
			
		||||
        self.assertEqual(self.config.section2.value2(), 2)
 | 
			
		||||
 | 
			
		||||
    @unittest.skipIf(sys.version_info[:2] < (3, 6), 'Pydantic supports Python 3.6+')
 | 
			
		||||
    def test_kwarg(self):
 | 
			
		||||
        self.config.from_pydantic(self.Settings1(), exclude={'section2'})
 | 
			
		||||
 | 
			
		||||
        self.assertEqual(self.config(), {'section1': {'value1': 1}})
 | 
			
		||||
        self.assertEqual(self.config.section1(), {'value1': 1})
 | 
			
		||||
        self.assertEqual(self.config.section1.value1(), 1)
 | 
			
		||||
 | 
			
		||||
    @unittest.skipIf(sys.version_info[:2] < (3, 6), 'Pydantic supports Python 3.6+')
 | 
			
		||||
    def test_merge(self):
 | 
			
		||||
        self.config.from_pydantic(self.Settings1())
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue
	
	Block a user