Fix errors in tests
Implement all the '/devices/' endpoint