def test_01_request_delete(self): # Create a delete request record = RequestFixtureFactory.record() acc = BasicAccount() acc.id = "test1" r = RequestApi.delete(record, acc, "01010101") # now check it was saved correctly assert r is not None r1 = r.pull(r.id) assert r1 is not None assert r1.owner == acc.id assert r1.action == "delete" assert r1.public_id == "01010101"
def test_01_request_update(self): # Create an update Request record = RequestFixtureFactory.record() acc = BasicAccount() acc.id = "test1" # without a public id r1 = RequestApi.update(record, acc) # with a public id r2 = RequestApi.update(record, acc, "01010101") # now check they were saved correctly assert r1 is not None assert r2 is not None r11 = r1.pull(r1.id) assert r11 is not None r21 = r2.pull(r2.id) assert r21 is not None