change asserts into unittest