Exemplo 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'")
Exemplo n.º 2
0
 def test_startswith(self):
     assert_startswith("foobar", "foo")
Exemplo 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'")
Exemplo 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)
Exemplo n.º 5
0
 def test_startswith(self):
     assert_startswith("foobar", "foo")