Beispiel #1
0
 def test_matches_deals_with_none(self):
     locale = LocaleFactory(code='en-US')
     client = ClientFactory(locale=None)
     assert not locale.matches(client)
Beispiel #2
0
 def test_matches_deals_with_none(self):
     country = LocaleFactory(code='US')
     client = ClientFactory(country=None)
     assert not country.matches(client)
Beispiel #3
0
 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)