Clean-up tests

- Introduce the base class `DeviceRegisterAPITestCase` that bundles
  device creation and users setup;
- Factor the dummy data creation for the Device, HeartBeat, and
  Crashreport models;
- Fix some odd assertions (e.g. using verity of an equality expression
  instead of equality assertion);
- Fix mislabeled tests;
- Fix scope of private class (static) methods.

Change-Id: I6e5655b1f3dda3782f32c5d110e700d8b77fcd89
1 file changed