Fix list_projects_for_endpoint failed bug

list_projects_for_endpoint fail with "500 Internal Server Error"
modify function name to 'list_projects_for_endpoint' and
add three test cases

Change-Id: Ibe86dd4fb845004d4ebce359de034f31bd50ecc9
Closes-Bug: #1269703
Merge "Fix list_projects_for_endpoint failed bug"