Example #1
0
    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'")
Example #2
0
 def test_startswith(self):
     assert_startswith("foobar", "foo")
Example #3
0
    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'")
Example #4
0
 def assert_startswith(self, text, prefix):
     warnings.warn("Use django_tools.unittest_utils.assertments.assert_startswith!", DeprecationWarning)
     assertments.assert_startswith(text, prefix)
Example #5
0
 def test_startswith(self):
     assert_startswith("foobar", "foo")