Ejemplo n.º 1
0
 def test_exists_article_ng_not_exists_status(self):
     result = DBUtil.exists_article(
         self.dynamodb,
         self.article_info_table_items[0]['article_id'],
         user_id=self.article_info_table_items[0]['user_id'],
         status='draft')
     self.assertFalse(result)
Ejemplo n.º 2
0
 def test_exists_article_ok_exists_user_and_status(self):
     result = DBUtil.exists_article(
         self.dynamodb,
         self.article_info_table_items[0]['article_id'],
         user_id=self.article_info_table_items[0]['user_id'],
         status=self.article_info_table_items[0]['status'])
     self.assertTrue(result)
Ejemplo n.º 3
0
 def test_exists_article_ng_not_exists_article_id(self):
     result = DBUtil.exists_article(
         self.dynamodb,
         'hogefugapiyo',
         user_id=self.article_info_table_items[0]['user_id'],
     )
     self.assertFalse(result)
Ejemplo n.º 4
0
 def test_exists_article_ok(self):
     result = DBUtil.exists_article(
         self.dynamodb, self.article_info_table_items[0]['article_id'])
     self.assertTrue(result)