def testLajiStoreNews(self): response = LajiStoreAPI.post_news(**self.news) self.assertEquals(True, "id" in response) response = LajiStoreAPI.get_news(response["id"]) self.assertEquals(True, "id" in response) self.news["id"] = response["id"] response = LajiStoreAPI.update_news(**self.news) self.assertEquals(True, "id" in response) response = LajiStoreAPI.delete_news(response["id"]) self.assertEquals(204, response.status_code)
def update(self): ''' Saves changes to the object to the corresponding LajiStore entry. ''' LajiStoreAPI.update_news(**self.__dict__) # __dict__ puts all arguments here.