def test_try_delete_post(self):
		#adding a post
		saved_post = posts_usecase.save_post(
			self.post_data["author"], self.post_data["content"], self.post_data["title"], 
			self.post_data["categorie"]
		)

		posts_usecase.delete_post(saved_post)
		_id = Post.get_by_id(saved_post)
		self.assertEquals(list(_id), [])
	def test_save_post(self):
		#adding a post
		saved_post_id = posts_usecase.save_post(
			self.post_data["author"], self.post_data["content"], self.post_data["title"],
			self.post_data["categorie"]
			)

		post = list(Post.get_by_id(saved_post_id))
		# the saved_post should have this values

		self.assertEquals(post[0].to_dict(exclude=["id", "date"]), self.post_data)
	def test_edit_post(self):

	 	#adding a post 
		_id = posts_usecase.save_post(
			self.post_data["author"], self.post_data["content"], self.post_data["title"], 
			self.post_data["categorie"]
	  	)

	 	# modify the subject of the post
	 	content = "hey what's up"

	 	# save the post with another subject
	 	post_id = posts_usecase.edit_post(_id, {"content": content})

	 	# get the post with id = post_id
	 	post = list(Post.get_by_id(post_id))[0]

	 	# the subject must be are modified subject
	 	self.assertEquals(content, post.content)