pyramid_cubicweb/tests/test_entities.py
changeset 11596 1f2570f1d72a
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/pyramid_cubicweb/tests/test_entities.py	Tue Jun 09 11:34:17 2015 +0200
@@ -0,0 +1,20 @@
+from __future__ import absolute_import
+
+from . import PyramidCWTest
+
+
+class EntitiesTest(PyramidCWTest):
+    def includeme(self, config):
+        config.include('pyramid_cubicweb.entities')
+
+    def test_delete(self):
+        with self.admin_access.repo_cnx() as cnx:
+            cnx.create_entity('CWGroup', name=u'tmp')
+            cnx.commit()
+
+        self.login()
+        res = self.webapp.delete('/cwgroup/tmp')
+        self.assertEqual(res.status_int, 204)
+
+        with self.admin_access.repo_cnx() as cnx:
+            self.assertEqual(cnx.find('CWGroup', name=u'tmp').rowcount, 0)