equal
deleted
inserted
replaced
|
1 from __future__ import absolute_import |
|
2 |
|
3 from . import PyramidCWTest |
|
4 |
|
5 |
|
6 class EntitiesTest(PyramidCWTest): |
|
7 def includeme(self, config): |
|
8 config.include('pyramid_cubicweb.entities') |
|
9 |
|
10 def test_delete(self): |
|
11 with self.admin_access.repo_cnx() as cnx: |
|
12 cnx.create_entity('CWGroup', name=u'tmp') |
|
13 cnx.commit() |
|
14 |
|
15 self.login() |
|
16 res = self.webapp.delete('/cwgroup/tmp') |
|
17 self.assertEqual(res.status_int, 204) |
|
18 |
|
19 with self.admin_access.repo_cnx() as cnx: |
|
20 self.assertEqual(cnx.find('CWGroup', name=u'tmp').rowcount, 0) |