[migration/test] avoid test interdependency by removing fakecustomtype cube
There is still a failing test afterward but it doesn't seem related to
changes in this series.
--- a/server/test/unittest_migractions.py Wed Dec 09 17:44:18 2015 +0100
+++ b/server/test/unittest_migractions.py Tue Dec 15 10:20:26 2015 +0100
@@ -291,14 +291,17 @@
def test_add_cube_with_custom_final_type(self):
with self.mh() as (cnx, mh):
- mh.cmd_add_cube('fakecustomtype')
- self.assertIn('Numeric', self.schema)
- self.assertTrue(self.schema['Numeric'].final)
- rdef = self.schema['num'].rdefs[('Location', 'Numeric')]
- self.assertEqual(rdef.scale, 10)
- self.assertEqual(rdef.precision, 18)
- fields = self.table_schema(mh, '%sLocation' % SQL_PREFIX)
- self.assertEqual(fields['%snum' % SQL_PREFIX], ('numeric', None)) # XXX
+ try:
+ mh.cmd_add_cube('fakecustomtype')
+ self.assertIn('Numeric', self.schema)
+ self.assertTrue(self.schema['Numeric'].final)
+ rdef = self.schema['num'].rdefs[('Location', 'Numeric')]
+ self.assertEqual(rdef.scale, 10)
+ self.assertEqual(rdef.precision, 18)
+ fields = self.table_schema(mh, '%sLocation' % SQL_PREFIX)
+ self.assertEqual(fields['%snum' % SQL_PREFIX], ('numeric', None)) # XXX
+ finally:
+ mh.cmd_drop_cube('fakecustomtype')
def test_add_drop_entity_type(self):
with self.mh() as (cnx, mh):