コード例 #1
0
 def test_make_it(self):
     sot = bulk_delete.BulkDelete(BODY)
     self.assertEqual(BODY["Number Not Found"], sot.not_found)
     self.assertEqual(BODY["Response Status"], sot.response_code)
     self.assertEqual(BODY["Errors"], sot.errors)
     self.assertEqual(BODY["Number Deleted"], sot.deleted)
     self.assertEqual(BODY["Response Body"], sot.response_body)
コード例 #2
0
 def test_basic(self):
     sot = bulk_delete.BulkDelete(BODY)
     self.assertIsNone(sot.resource_key)
     self.assertIsNone(sot.resources_key)
     self.assertEqual("/?bulk-delete", sot.base_path)
     self.assertTrue(sot.allow_delete)
     self.assertFalse(sot.allow_create)
     self.assertFalse(sot.allow_update)
     self.assertFalse(sot.allow_retrieve)
     self.assertFalse(sot.allow_list)
     self.assertFalse(sot.allow_head)
コード例 #3
0
    def test_delete(self):
        sot = bulk_delete.BulkDelete()
        diplomats = "\n".join(["/Cam", "/Juelz", "/Jimmy", "/Freeky"])
        result = sot.delete(self.sess, diplomats)

        self.assertEqual(result, bulk_delete.BulkDelete(BODY))