Exemplo n.º 1
0
  def test_really_delete(self):
    todo1 = new_todo(self.user, self.project, save=True)
    self.login()

    response = self.delete(self.base_url("/" + todo1.key), query_string={"really": "1"})
    self.assertStatus(200, response)

    with self.assertRaises(NotFoundError):
      ArchivedTodo.get(todo1.key)

    with self.assertRaises(NotFoundError):
      Todo.get(todo1.key)
Exemplo n.º 2
0
    def test_really_delete(self):
        todo1 = new_todo(self.user, self.project, save=True)
        self.login()

        response = self.delete(self.base_url("/" + todo1.key),
                               query_string={"really": "1"})
        self.assertStatus(200, response)

        with self.assertRaises(NotFoundError):
            ArchivedTodo.get(todo1.key)

        with self.assertRaises(NotFoundError):
            Todo.get(todo1.key)
Exemplo n.º 3
0
  def test_archived_delete(self):
    todo1 = new_todo(self.user, self.project, save=True)
    self.login()

    response = self.delete(self.base_url("/" + todo1.key))
    self.assertStatus(200, response)

    with self.assertRaises(NotFoundError):
      Todo.get(todo1.key)

    todo1_again = ArchivedTodo.get(todo1.key)
    self.assertEquals(todo1.key, todo1_again.key)
Exemplo n.º 4
0
    def test_archived_delete(self):
        todo1 = new_todo(self.user, self.project, save=True)
        self.login()

        response = self.delete(self.base_url("/" + todo1.key))
        self.assertStatus(200, response)

        with self.assertRaises(NotFoundError):
            Todo.get(todo1.key)

        todo1_again = ArchivedTodo.get(todo1.key)
        self.assertEquals(todo1.key, todo1_again.key)