Ejemplo n.º 1
0
    def test_get_or_create(self):
        before = len(device.get_all())
        device.get_or_create("ABCD1234567", {"type":"Type", "manufacturer":"Manu"})
        self.assertEquals(before, len(device.get_all()))

        d = device.get_or_create("TESTTEST", {"type":"Type", "manufacturer":"Manu"})
        self.assertLess(before, len(device.get_all()))

        d.delete()
Ejemplo n.º 2
0
 def test_get_all(self):
     self.assertGreater(len(device.get_all()), 0)