MCPcopy Create free account
hub / github.com/Keeper-Security/Commander / __init__

Method __init__

unit-tests/test_command_device_management.py:23–38  ·  view source on GitHub ↗
(self, device_name="Test Device", device_id=1, 
                 client_type=DeviceManagement_pb2.CHROME_EXTENSION,
                 client_type_category=DeviceManagement_pb2.CAT_EXTENSION,
                 client_form_factor=APIRequest_pb2.FF_EMPTY,
                 login_state=APIRequest_pb2.LOGGED_IN,
                 device_status=APIRequest_pb2.DEVICE_OK,
                 last_modified_time=1640995200000,
                 encrypted_device_token=None)

Source from the content-addressed store, hash-verified

21 """Mock device object for testing."""
22
23 def __init__(self, device_name="Test Device", device_id=1,
24 client_type=DeviceManagement_pb2.CHROME_EXTENSION,
25 client_type_category=DeviceManagement_pb2.CAT_EXTENSION,
26 client_form_factor=APIRequest_pb2.FF_EMPTY,
27 login_state=APIRequest_pb2.LOGGED_IN,
28 device_status=APIRequest_pb2.DEVICE_OK,
29 last_modified_time=1640995200000,
30 encrypted_device_token=None):
31 self.deviceName = device_name
32 self.clientType = client_type
33 self.clientTypeCategory = client_type_category
34 self.clientFormFactor = client_form_factor
35 self.loginState = login_state
36 self.deviceStatus = device_status
37 self.lastModifiedTime = last_modified_time
38 self.encryptedDeviceToken = encrypted_device_token or f'token_{device_id}'.encode()
39
40
41class MockDeviceGroup:

Callers

nothing calls this directly

Calls 1

encodeMethod · 0.45

Tested by

no test coverage detected