Move betterproto/tests → tests
This commit is contained in:
		
				
					committed by
					
						 Bouke Versteegh
						Bouke Versteegh
					
				
			
			
				
	
			
			
			
						parent
						
							8864f4fdbd
						
					
				
				
					commit
					cebf9176a3
				
			
							
								
								
									
										15
									
								
								tests/inputs/oneof/test_oneof.py
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										15
									
								
								tests/inputs/oneof/test_oneof.py
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,15 @@ | ||||
| import betterproto | ||||
| from tests.output_betterproto.oneof import Test | ||||
| from tests.util import get_test_case_json_data | ||||
|  | ||||
|  | ||||
| def test_which_count(): | ||||
|     message = Test() | ||||
|     message.from_json(get_test_case_json_data("oneof")) | ||||
|     assert betterproto.which_one_of(message, "foo") == ("count", 100) | ||||
|  | ||||
|  | ||||
| def test_which_name(): | ||||
|     message = Test() | ||||
|     message.from_json(get_test_case_json_data("oneof", "oneof-name.json")) | ||||
|     assert betterproto.which_one_of(message, "foo") == ("name", "foobar") | ||||
		Reference in New Issue
	
	Block a user