Commit 4e58077b authored by Katia Saurfelt's avatar Katia Saurfelt
Browse files

Backed out changeset aeeaf3b6ea1b

--HG--
branch : seda21
parent be942bfe959b
Pipeline #89638 failed with stages
in 3 minutes and 18 seconds
......@@ -364,39 +364,6 @@ class OrderingHooksTC(CubicWebTC):
self.assertEqual(bdo2.ordering, 1)
class DataObjectGrouHooksTC(CubicWebTC):
def test_create_data_object_group(self):
with self.admin_access.cnx() as cnx:
transfer = cnx.create_entity('SEDAArchiveTransfer', title=u'test profile',
simplified_profile=True)
unit, unit_alt, unit_alt_seq = testutils.create_archive_unit(transfer)
binary_obj = testutils.create_data_object(unit_alt_seq, user_cardinality=u'1',
seda_binary_data_object=transfer)
physical_obj = testutils.create_data_object(unit_alt_seq, user_cardinality=u'1',
seda_physical_data_object=transfer)
cnx.commit()
self.assertEqual(len(binary_obj.seda_binary_data_object), 1)
self.assertEqual(len(physical_obj.seda_physical_data_object), 1)
def test_delete_data_object_group(self):
with self.admin_access.cnx() as cnx:
self.assertFalse(cnx.find('SEDADataObjectGroup').rowcount)
transfer = cnx.create_entity('SEDAArchiveTransfer', title=u'test profile',
simplified_profile=True)
unit, unit_alt, unit_alt_seq = testutils.create_archive_unit(transfer)
binary_obj = testutils.create_data_object(unit_alt_seq, user_cardinality=u'1',
seda_binary_data_object=transfer)
physical_obj = testutils.create_data_object(unit_alt_seq, user_cardinality=u'1',
seda_physical_data_object=transfer)
cnx.commit()
self.assertEqual(2, cnx.find('SEDADataObjectGroup').rowcount)
binary_obj.cw_delete()
physical_obj.cw_delete()
cnx.commit()
self.assertFalse(cnx.find('SEDADataObjectGroup').rowcount)
if __name__ == '__main__':
import unittest
unittest.main()
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment