I'm taking a guess here, but it looks like the purpose of this function is to aid development by allowing you to quickly gut-check the operation of this class. Personally, I like seeing this sort of thing live *outside* the class in its own function, maybe alongside the class definition. That way, it's clear to a reader that this method isn't vital to operation of the class but instead is a way to verify correct behavior. 

In fact, this looks like the beginning of a unittest, and you may see significant benefit in breaking it out into a `unittest.TestCase`.