Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(2)  |  Call(1)  |  Derive(0)  |  Import(1)

src/m/o/moztrap-HEAD/tests/view/manage/environments/test_views.py   moztrap(Download)
    def test_unknown_object_type(self):
        """Passing an unknown object_type raises 404."""
        # Have to test this by calling the view func directly, as the URL
        # pattern prevents a bad object_type from getting through.
        from moztrap.view.manage.environments.views import narrow_environments
        req = Mock()
        req.user = self.user
 
        with self.assertRaises(Http404):
            narrow_environments(req, "foo", "1")