Refs -- Completed stringformat filter tests
@@ -29,6 +29,11 @@ class FunctionTests(SimpleTestCase):
def test_format(self):
self.assertEqual(stringformat(1, '03d'), '001')
+ self.assertEqual(stringformat([1, None], 's'), '[1, None]')
+ self.assertEqual(stringformat({1, 2}, 's'), '{1, 2}')
+ self.assertEqual(stringformat({1: 2, 2: 3}, 's'), '{1: 2, 2: 3}')
def test_invalid(self):
self.assertEqual(stringformat(1, 'z'), '')
+ self.assertEqual(stringformat(object(), 'd'), '')
+ self.assertEqual(stringformat(None, 'd'), '')
