def test_unsupported_arguments(self, h): with pytest.raises(ValueError) as exc: h._humanize(now, foo=42) assert text_type(exc.value) == ( "An error occured during execution function 'naturaltime'" )
def test_invalid_fname(self, h): with pytest.raises(Exception) as exc: h._humanize(now, fname='foo') assert text_type(exc.value) == ( "Humanize module does not contains function 'foo'" )