コード例 #1
0
ファイル: test_todo_api.py プロジェクト: Siecje/projecto
  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)
コード例 #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)
コード例 #3
0
ファイル: test_todo_api.py プロジェクト: Siecje/projecto
  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)
コード例 #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)