Asserting that return_code is 0 is not enough. imho also check that the object you got back matches the one you created