Exemplo n.º 1
0
def test_get_device_id(cert):
    with mock.patch('builtins.open',
                    mock.mock_open(read_data=cert),
                    create=True), mock.patch('agent.can_read_cert') as cr:
        cr.return_value = True
        device_id = agent.get_device_id()
        assert device_id == '4853b630822946019393b16c5b710b9e.d.wott.local'
Exemplo n.º 2
0
def test_get_device_id(cert):
    with mock.patch('builtins.open',
                    mock.mock_open(read_data=cert),
                    create=True):
        device_id = agent.get_device_id()
        assert device_id == '4853b630822946019393b16c5b710b9e.d.wott.local'