Unit testing for assignment val/ref Python