Fix test for get_*_by_name invalidation

Use the correct .get_*by_name method for project and domain to
populate the cache instead of get by id when testing.

Change-Id: Ie1c02183688b0d928edc8d9c90a785cd98998377
Related-Bug: #1311142
Merge "Fix test for get_*_by_name invalidation"