add test to test_devices.py and modify old test files