test of pairs function using unittest