def test__names_list__empty(self):
     """
     Tests LocationWrap.names_list with an empty adminnames
     """
     wrap = LocationWrap(location=None, weight=0, adminnames=None)
     expected = []
     actual = wrap.names_list()
     assert expected == actual
 def test__names_list__not_adminnames(self):
     """
     Tests LocationWrap.names_list with an adminnames that is not the right
     type
     """
     wrap = LocationWrap(location=None, weight=0, adminnames=1)
     expected = []
     actual = wrap.names_list()
     assert expected == actual
 def test__names_list__pass(self):
     """
     Tests LocationWrap.names_list with a populated adminnames
     """
     A1 = 'orange'
     A2 = 'banana'
     A3 = 'cranberry'
     A4 = 'peach'
     CO = 'carrot'
     names = LocationAdminNames(
         countryname=CO,
         admin1name=A1,
         admin2name=A2,
         admin3name=A3,
         admin4name=A4)
     wrap = LocationWrap(location=None, weight=0, adminnames=names)
     expected = [A4, A3, A2, A1, CO]
     actual = wrap.names_list()
     assert expected == actual