def test_not_startswith(self):

        with self.assertRaises(AssertionError) as cm:
            assert_startswith("foo", "bar")

        assert_pformat_equal(cm.exception.args[0],
                             "'foo' doesn't starts with 'bar'")
 def test_startswith(self):
     assert_startswith("foobar", "foo")
    def test_not_startswith(self):

        with self.assertRaises(AssertionError) as cm:
            assert_startswith("foo", "bar")

        assert_pformat_equal(cm.exception.args[0], "'foo' doesn't starts with 'bar'")
Exemple #4
0
 def assert_startswith(self, text, prefix):
     warnings.warn("Use django_tools.unittest_utils.assertments.assert_startswith!", DeprecationWarning)
     assertments.assert_startswith(text, prefix)
 def test_startswith(self):
     assert_startswith("foobar", "foo")