# HG changeset patch # User Sylvain Thénault # Date 1444231655 -7200 # Node ID d800ecd381f6411e0f3a6aa1c5c50897317adf78 # Parent d89e9176d263c5fca13d8f46dc5e07f604faff79 [server/test] bit of PEP8 diff -r d89e9176d263 -r d800ecd381f6 server/test/datacomputed/schema.py --- a/server/test/datacomputed/schema.py Tue Aug 25 11:11:34 2015 +0200 +++ b/server/test/datacomputed/schema.py Wed Oct 07 17:27:35 2015 +0200 @@ -36,11 +36,13 @@ class Company(EntityType): score100 = Float(formula='Any AVG(NN) WHERE X employees E, N concerns E, N note100 NN') + class Note(EntityType): note = Int() note20 = Int(formula='Any N*20 WHERE X note N') note100 = Int(formula='Any N*20 WHERE X note N') + class concerns(RelationDefinition): subject = 'Note' object = 'Employee' diff -r d89e9176d263 -r d800ecd381f6 server/test/unittest_migractions.py --- a/server/test/unittest_migractions.py Tue Aug 25 11:11:34 2015 +0200 +++ b/server/test/unittest_migractions.py Wed Oct 07 17:27:35 2015 +0200 @@ -703,8 +703,7 @@ self.assertNotIn('works_for', self.schema) with self.mh() as (cnx, mh): with self.assertRaises(ExecutionError) as exc: - mh.cmd_add_relation_definition('Employee', 'works_for', - 'Company') + mh.cmd_add_relation_definition('Employee', 'works_for', 'Company') self.assertEqual(str(exc.exception), 'Cannot add a relation definition for a computed ' 'relation (works_for)') @@ -776,9 +775,9 @@ assert not cnx.execute('Company X') c = cnx.create_entity('Company') e1 = cnx.create_entity('Employee', reverse_employees=c) - n1 = cnx.create_entity('Note', note=2, concerns=e1) + cnx.create_entity('Note', note=2, concerns=e1) e2 = cnx.create_entity('Employee', reverse_employees=c) - n2 = cnx.create_entity('Note', note=4, concerns=e2) + cnx.create_entity('Note', note=4, concerns=e2) cnx.commit() def assert_score_initialized(self, mh):