Location tests2

 Next set of location related testcases
a) Uses factory functions
b) Fixed navigation for the entities
c) Added more new testcases to test_location module.
What about moving the logic to change the context to a function. It allows repeating code and will centralize if any change is needed in the future.