mirror of
				https://github.com/python-kasa/python-kasa.git
				synced 2025-11-04 06:32:07 +00:00 
			
		
		
		
	Update dump_devinfo for raw discovery json and common redactors (#1358)
	
		
			
	
		
	
	
		
	
		
			Some checks failed
		
		
	
	
		
			
				
	
				CI / Perform linting checks (3.13) (push) Waiting to run
				
			
		
			
				
	
				CI / Python ${{ matrix.python-version}} on ${{ matrix.os }}${{ fromJSON('[" (extras)", ""]')[matrix.extras == ''] }} (false, macos-latest, 3.11) (push) Blocked by required conditions
				
			
		
			
				
	
				CI / Python ${{ matrix.python-version}} on ${{ matrix.os }}${{ fromJSON('[" (extras)", ""]')[matrix.extras == ''] }} (false, macos-latest, 3.12) (push) Blocked by required conditions
				
			
		
			
				
	
				CI / Python ${{ matrix.python-version}} on ${{ matrix.os }}${{ fromJSON('[" (extras)", ""]')[matrix.extras == ''] }} (false, macos-latest, 3.13) (push) Blocked by required conditions
				
			
		
			
				
	
				CI / Python ${{ matrix.python-version}} on ${{ matrix.os }}${{ fromJSON('[" (extras)", ""]')[matrix.extras == ''] }} (false, ubuntu-latest, 3.11) (push) Blocked by required conditions
				
			
		
			
				
	
				CI / Python ${{ matrix.python-version}} on ${{ matrix.os }}${{ fromJSON('[" (extras)", ""]')[matrix.extras == ''] }} (false, ubuntu-latest, 3.12) (push) Blocked by required conditions
				
			
		
			
				
	
				CI / Python ${{ matrix.python-version}} on ${{ matrix.os }}${{ fromJSON('[" (extras)", ""]')[matrix.extras == ''] }} (false, ubuntu-latest, 3.13) (push) Blocked by required conditions
				
			
		
			
				
	
				CI / Python ${{ matrix.python-version}} on ${{ matrix.os }}${{ fromJSON('[" (extras)", ""]')[matrix.extras == ''] }} (false, windows-latest, 3.11) (push) Blocked by required conditions
				
			
		
			
				
	
				CI / Python ${{ matrix.python-version}} on ${{ matrix.os }}${{ fromJSON('[" (extras)", ""]')[matrix.extras == ''] }} (false, windows-latest, 3.12) (push) Blocked by required conditions
				
			
		
			
				
	
				CI / Python ${{ matrix.python-version}} on ${{ matrix.os }}${{ fromJSON('[" (extras)", ""]')[matrix.extras == ''] }} (false, windows-latest, 3.13) (push) Blocked by required conditions
				
			
		
			
				
	
				CI / Python ${{ matrix.python-version}} on ${{ matrix.os }}${{ fromJSON('[" (extras)", ""]')[matrix.extras == ''] }} (true, ubuntu-latest, 3.11) (push) Blocked by required conditions
				
			
		
			
				
	
				CI / Python ${{ matrix.python-version}} on ${{ matrix.os }}${{ fromJSON('[" (extras)", ""]')[matrix.extras == ''] }} (true, ubuntu-latest, 3.12) (push) Blocked by required conditions
				
			
		
			
				
	
				CI / Python ${{ matrix.python-version}} on ${{ matrix.os }}${{ fromJSON('[" (extras)", ""]')[matrix.extras == ''] }} (true, ubuntu-latest, 3.13) (push) Blocked by required conditions
				
			
		
			
				
	
				CodeQL checks / Analyze (python) (push) Has been cancelled
				
			
		
		
	
	
				
					
				
			
		
			Some checks failed
		
		
	
	CI / Perform linting checks (3.13) (push) Waiting to run
				
			CI / Python ${{ matrix.python-version}} on ${{ matrix.os }}${{ fromJSON('[" (extras)", ""]')[matrix.extras == ''] }} (false, macos-latest, 3.11) (push) Blocked by required conditions
				
			CI / Python ${{ matrix.python-version}} on ${{ matrix.os }}${{ fromJSON('[" (extras)", ""]')[matrix.extras == ''] }} (false, macos-latest, 3.12) (push) Blocked by required conditions
				
			CI / Python ${{ matrix.python-version}} on ${{ matrix.os }}${{ fromJSON('[" (extras)", ""]')[matrix.extras == ''] }} (false, macos-latest, 3.13) (push) Blocked by required conditions
				
			CI / Python ${{ matrix.python-version}} on ${{ matrix.os }}${{ fromJSON('[" (extras)", ""]')[matrix.extras == ''] }} (false, ubuntu-latest, 3.11) (push) Blocked by required conditions
				
			CI / Python ${{ matrix.python-version}} on ${{ matrix.os }}${{ fromJSON('[" (extras)", ""]')[matrix.extras == ''] }} (false, ubuntu-latest, 3.12) (push) Blocked by required conditions
				
			CI / Python ${{ matrix.python-version}} on ${{ matrix.os }}${{ fromJSON('[" (extras)", ""]')[matrix.extras == ''] }} (false, ubuntu-latest, 3.13) (push) Blocked by required conditions
				
			CI / Python ${{ matrix.python-version}} on ${{ matrix.os }}${{ fromJSON('[" (extras)", ""]')[matrix.extras == ''] }} (false, windows-latest, 3.11) (push) Blocked by required conditions
				
			CI / Python ${{ matrix.python-version}} on ${{ matrix.os }}${{ fromJSON('[" (extras)", ""]')[matrix.extras == ''] }} (false, windows-latest, 3.12) (push) Blocked by required conditions
				
			CI / Python ${{ matrix.python-version}} on ${{ matrix.os }}${{ fromJSON('[" (extras)", ""]')[matrix.extras == ''] }} (false, windows-latest, 3.13) (push) Blocked by required conditions
				
			CI / Python ${{ matrix.python-version}} on ${{ matrix.os }}${{ fromJSON('[" (extras)", ""]')[matrix.extras == ''] }} (true, ubuntu-latest, 3.11) (push) Blocked by required conditions
				
			CI / Python ${{ matrix.python-version}} on ${{ matrix.os }}${{ fromJSON('[" (extras)", ""]')[matrix.extras == ''] }} (true, ubuntu-latest, 3.12) (push) Blocked by required conditions
				
			CI / Python ${{ matrix.python-version}} on ${{ matrix.os }}${{ fromJSON('[" (extras)", ""]')[matrix.extras == ''] }} (true, ubuntu-latest, 3.13) (push) Blocked by required conditions
				
			CodeQL checks / Analyze (python) (push) Has been cancelled
				
			This PR does a few related things to dump_devinfo: - Store the raw discovery result in the fixture. - Consolidate redaction logic so it's not duplicated in dump_devinfo. - Update existing fixtures to: - Store raw discovery result under `result` - Use `SCRUBBED_CHILD_DEVICE_ID` everywhere - Have correct values as per the consolidated redactors.
This commit is contained in:
		
							
								
								
									
										63
									
								
								tests/fixtures/smartcam/TC65_1.0_1.3.9.json
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										63
									
								
								tests/fixtures/smartcam/TC65_1.0_1.3.9.json
									
									
									
									
										vendored
									
									
								
							@@ -1,35 +1,38 @@
 | 
			
		||||
{
 | 
			
		||||
    "discovery_result": {
 | 
			
		||||
        "decrypted_data": {
 | 
			
		||||
            "connect_ssid": "0000000",
 | 
			
		||||
            "connect_type": "wireless",
 | 
			
		||||
            "device_id": "0000000000000000000000000000000000000000",
 | 
			
		||||
            "http_port": 443,
 | 
			
		||||
            "last_alarm_time": "1698149810",
 | 
			
		||||
            "last_alarm_type": "motion",
 | 
			
		||||
            "owner": "00000000000000000000000000000000",
 | 
			
		||||
            "sd_status": "offline"
 | 
			
		||||
        },
 | 
			
		||||
        "device_id": "00000000000000000000000000000000",
 | 
			
		||||
        "device_model": "TC65",
 | 
			
		||||
        "device_name": "#MASKED_NAME#",
 | 
			
		||||
        "device_type": "SMART.IPCAMERA",
 | 
			
		||||
        "encrypt_info": {
 | 
			
		||||
            "data": "",
 | 
			
		||||
            "key": "",
 | 
			
		||||
            "sym_schm": "AES"
 | 
			
		||||
        },
 | 
			
		||||
        "encrypt_type": [
 | 
			
		||||
            "3"
 | 
			
		||||
        ],
 | 
			
		||||
        "factory_default": false,
 | 
			
		||||
        "firmware_version": "1.3.9 Build 231024 Rel.72919n(4555)",
 | 
			
		||||
        "hardware_version": "1.0",
 | 
			
		||||
        "ip": "127.0.0.123",
 | 
			
		||||
        "is_support_iot_cloud": true,
 | 
			
		||||
        "mac": "A8-6E-84-00-00-00",
 | 
			
		||||
        "mgt_encrypt_schm": {
 | 
			
		||||
            "is_support_https": true
 | 
			
		||||
        "error_code": 0,
 | 
			
		||||
        "result": {
 | 
			
		||||
            "decrypted_data": {
 | 
			
		||||
                "connect_ssid": "#MASKED_SSID#",
 | 
			
		||||
                "connect_type": "wireless",
 | 
			
		||||
                "device_id": "0000000000000000000000000000000000000000",
 | 
			
		||||
                "http_port": 443,
 | 
			
		||||
                "last_alarm_time": "1698149810",
 | 
			
		||||
                "last_alarm_type": "motion",
 | 
			
		||||
                "owner": "00000000000000000000000000000000",
 | 
			
		||||
                "sd_status": "offline"
 | 
			
		||||
            },
 | 
			
		||||
            "device_id": "00000000000000000000000000000000",
 | 
			
		||||
            "device_model": "TC65",
 | 
			
		||||
            "device_name": "#MASKED_NAME#",
 | 
			
		||||
            "device_type": "SMART.IPCAMERA",
 | 
			
		||||
            "encrypt_info": {
 | 
			
		||||
                "data": "",
 | 
			
		||||
                "key": "",
 | 
			
		||||
                "sym_schm": "AES"
 | 
			
		||||
            },
 | 
			
		||||
            "encrypt_type": [
 | 
			
		||||
                "3"
 | 
			
		||||
            ],
 | 
			
		||||
            "factory_default": false,
 | 
			
		||||
            "firmware_version": "1.3.9 Build 231024 Rel.72919n(4555)",
 | 
			
		||||
            "hardware_version": "1.0",
 | 
			
		||||
            "ip": "127.0.0.123",
 | 
			
		||||
            "is_support_iot_cloud": true,
 | 
			
		||||
            "mac": "A8-6E-84-00-00-00",
 | 
			
		||||
            "mgt_encrypt_schm": {
 | 
			
		||||
                "is_support_https": true
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
    },
 | 
			
		||||
    "getAlertPlan": {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user