Add basic test_get_affiliate_id() test. #339