This assertion will always be True (you just made name and label equal to each other). What you want to do is check that, after the object is created, both returned name and label match.