There is already a method that does this, called assertEqual.