def test_idempotent_for_null_values(self): self.assertEqual(strip_whitespace(colander.null), colander.null)
def test_removes_all_kinds_of_spaces(self): value = " \t teaser \n \r" self.assertEqual(strip_whitespace(value), 'teaser')
def test_does_remove_middle_spaces(self): self.assertEqual(strip_whitespace('a b c'), 'a b c')
def preparer(self, appstruct): return strip_whitespace(appstruct)
def test_does_remove_middle_spaces(self): self.assertEqual(strip_whitespace("a b c"), "a b c")
def test_removes_all_kinds_of_spaces(self): value = " \t teaser \n \r" self.assertEqual(strip_whitespace(value), "teaser")