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

All Samples(17)  |  Call(17)  |  Derive(0)  |  Import(0)

src/m/o/moztrap-HEAD/tests/view/manage/environments/test_views.py   moztrap(Download)
    def test_no_action(self):
        """Returns empty JSON data if given no action."""
        res = self.post({})
 
        self.assertEqual(res.json, {"messages": []})
        res = self.post({"action-delete": "element-{0}".format(el.id)})
 
        self.assertEqual(res.json, {"messages": [], "html": ""})
        self.assertEqual(self.refresh(el).deleted_by, self.user)
 
        res = self.post({"action-delete": "category-{0}".format(c.id)})
 
        self.assertEqual(res.json, {"messages": [], "html": ""})
        self.assertEqual(self.refresh(c).deleted_by, self.user)
 

src/m/o/moztrap-HEAD/tests/view/manage/cases/test_views.py   moztrap(Download)
 
        new = pv.caseversions.get()
        self.assertEqual(new.name, self.cv.name)
        self.assertEqual(new.case, self.cv.case)
        self.assertRedirects(

src/m/o/moztrap-HEAD/tests/view/users/test_views.py   moztrap(Download)
 
        ak = self.model.ApiKey.objects.get()
        self.assertEqual(ak.created_by, self.user)
        self.assertEqual(ak.owner, self.owner)