Unless I am mistaken, all the code here is a copy/paste of test_add_tag so to avoid duplication, you could replace all the code above this by a simple self.test_add_tag().