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