def test_bytes_resource_get(self):
     communicator = mock.Mock()
     response = base.AsynchronousResponse([{'bytes': b'y'}], command='')
     communicator.call.return_value.get.return_value = response
     some_resource = resource.RouterOsResource(communicator, '/bytes',
                                               BYTES_STRUCTURE)
     result = some_resource.get()
     self.assertEqual(result, [{'bytes': b'y'}])
 def test_boolean_resource_get(self):
     communicator = mock.Mock()
     response = base.AsynchronousResponse([{'boolean': b'yes'}], command='')
     communicator.call.return_value.get.return_value = response
     some_resource = resource.RouterOsResource(communicator, '/boolean',
                                               BOOLEAN_STRUCTURE)
     result = some_resource.get()
     self.assertEqual(result, [{'boolean': True}])
 def test_unknown_resource_get(self):
     communicator = mock.Mock()
     response = base.AsynchronousResponse([{'x': b'y'}], command='')
     communicator.call.return_value.get.return_value = response
     some_resource = resource.RouterOsResource(communicator, '/unknown',
                                               structure.default_structure)
     result = some_resource.get()
     self.assertEqual(result, [{'x': 'y'}])