Did I find the right examples for you? yes no Crawl my project Python Jobs
All Samples(6) | Call(6) | Derive(0) | Import(0)
src/o/p/OpenEats-HEAD/list/tests.py OpenEats(Download)
def test_post(self): '''do a simple test to test the list edit form''' list = GroceryList.objects.get(pk=1) data = { 'title':'test',
#send no data list = GroceryList.objects.get(pk=1) no_title = { 'items-TOTAL_FORMS': 1,
self.assertEqual(resp.status_code, 302) self.assertRedirects(resp, reverse('grocery_show',kwargs={'user':'testUser', 'slug':'test'})) list = GroceryList.objects.get(pk=1) self.assertTrue(list.get_shared()) self.assertEqual(list.get_shared_to(), user2)
def test_delete(self): '''test that only the owner of a list can delete it''' #santity check make sure the list is owned by testUser list = GroceryList.objects.get(pk=1)
def test_addRecipe(self): '''test adding recipe ingredients to a list''' recipe = Recipe.objects.get(pk=1) list = GroceryList.objects.get(pk=1)