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 delete(self): ''' Deletes the news from LajiStore. Note that the object is not destroyed! ''' LajiStoreAPI.delete_news(self.id)