def testLajiStoreDevice(self):
        response = LajiStoreAPI.post_device(**self.device)
        self.assertEquals(True, "id" in response)

        response = LajiStoreAPI.get_device(response["id"])
        self.assertEquals(True, "id" in response)

        self.device["id"] = response["id"]
        response = LajiStoreAPI.update_device(**self.device)
        self.assertEquals(True, "id" in response)

        response = LajiStoreAPI.delete_device(response["id"])
        self.assertEquals(204, response.status_code)
Exemple #2
0
 def update(self):
     '''
     Saves changes to the object to the corresponding LajiStore entry.
     '''
     self.dateEdited = current_time_as_lajistore_timestamp()
     LajiStoreAPI.update_device(**self.__dict__)  # __dict__ puts all arguments here.
Exemple #3
0
 def update(self):
     '''
     Saves changes to the object to the corresponding LajiStore entry.
     '''
     LajiStoreAPI.update_device(**self.__dict__)  # __dict__ puts all arguments here