def test_matches_deals_with_none(self): locale = LocaleFactory(code='en-US') client = ClientFactory(locale=None) assert not locale.matches(client)
def test_matches_deals_with_none(self): country = LocaleFactory(code='US') client = ClientFactory(country=None) assert not country.matches(client)
def test_matches_works(self): locale = LocaleFactory(code='en-US') client1 = ClientFactory(locale='en-US') client2 = ClientFactory(locale='de') assert locale.matches(client1) assert not locale.matches(client2)