def test_whitespace(self): self.assertEqual( force_integers(dict(fishing_limit=' '))['fishing_limit'], '0') self.assertEqual( force_integers(dict(fishing_limit='\t'))['fishing_limit'], '0') self.assertEqual( force_integers(dict(fishing_limit='\n'))['fishing_limit'], '0')
def test_percent(self): self.assertEqual( force_integers(dict(tax_rate='100%'))['tax_rate'], '100')
def test_empty(self): kwargs = dict(cotton='') self.assertEqual(force_integers(kwargs)['cotton'], '0')
def test_normal(self): kwargs = dict(cotton='3') self.assertEqual(force_integers(kwargs)['cotton'], '3')