Map assertions in test_parser to unittest style