Esempio n. 1
0
    def update(self):
        '''
        Saves changes to the object to the corresponding LajiStore entry.
        '''

        self.dateEdited = current_time_as_lajistore_timestamp()
        dict = self.to_dict()
        LajiStoreAPI.update_document(**dict)  # to_dict() puts all arguments here
    def testLajiStoreDocument(self):
        response = LajiStoreAPI.post_document(**self.document)
        self.assertEquals(True, "id" in response)

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

        self.document["id"] = response["id"]
        response = LajiStoreAPI.update_document(**self.document)

        self.assertEquals(True, "id" in response)

        response = LajiStoreAPI.delete_document(response["id"])
        self.assertEquals(204, response.status_code)
Esempio n. 3
0
def update_from_dict(**kwargs):
    LajiStoreAPI.update_document(**kwargs)
Esempio n. 4
0
 def update(self):
     '''
     Saves changes to the object to the corresponding LajiStore entry.
     '''
     dict = self.to_dict()
     LajiStoreAPI.update_document(**dict) #__dict__ puts all arguments here