1
0
Fork 0
mirror of https://github.com/yweber/lodel2.git synced 2026-08-08 05:18:37 +02:00
Commit graph

141 commits

Author SHA1 Message Date
Yann
10379c6a95 Fieldgroups are deleted 2015-11-04 13:52:58 +01:00
Yann
cb7a37e7a2 Add checks in EmField, add tests for EmField + bugfix in check in Model.create_component
Checks for EmField :
- checks that the name is uniq in an EmClass
- checks that a relation EmClass <- rel2type -> EmType is uniq
2015-11-04 10:40:36 +01:00
Yann
7b0df11496 Removing rel2type fields and rel2type attributes fields from LeClass and LeType fields lists 2015-10-30 14:47:16 +01:00
Yann
76782b1b5b BugFix in Model tests
An old string was given as argument to DummyMigrationHandler and was interpreted as debug = True
2015-10-21 09:50:26 +02:00
Yann
baeff1f7e6 Implements the EmClass::linked_type() method and add 2 new property method to EmField : em_class and fieldgroup
Associated tests has been added/updated
2015-10-20 17:10:40 +02:00
ArnAud
a4dacc654a classtype: use the same naming pattern for *_id fields 2015-10-16 13:46:29 +02:00
Yann
384ffb006b Default fields processing changes + updated the me.json
Now on load default fields for EmClass are created. The EmClass.check method create them if they are not present.
2015-10-16 11:14:15 +02:00
Yann
9df9095da3 Add a test for EmField
Checking that internal='object' is reserved for common fields
2015-10-15 17:32:39 +02:00
Yann
94d4967642 Add common_fields and make the differences between common fields and default fields 2015-10-15 17:30:23 +02:00
Yann
ad1beff75d Added default fields for EmClass + fixing some tests and EmClass function that were broken
Added default fields for EmClass, they are listed by classtype in EmClassType
Fixing some tests (testing that a new EmClass has no fieldgroups)
Fixing the delete_check of EmClass. Now an EmClass can be deleted if it contains only default fieldgroup and default fields
2015-10-15 15:07:56 +02:00
Yann
b521c2c7b6 Modified EmField and Model to fit with the new fieldtypes 2015-10-14 15:11:00 +02:00
Yann
a9bf80d83d Adding a second possible parent for the EmType rubrique in me.json 2015-10-09 17:19:12 +02:00
ArnAud
6890375041 Databases: get rid of old and unused code 2015-10-08 10:51:40 +02:00
ArnAud
f303c0c241 start of lodel1 migration tool 2015-10-08 10:43:55 +02:00
Yann
abb700b0c0 Added 2 invalid params for emclass_from_name() method 2015-10-01 12:13:18 +02:00
Yann
ea51650ab3 Added tests on Types hierarchy and selected field for migrate_handler() method 2015-10-01 12:10:47 +02:00
Roland Haroutiounian
2ea37c3112 PEP8/PyLint on test_types.py 2015-09-30 15:00:40 +02:00
Roland Haroutiounian
233ce905fc PEP8/PyLint on test_model.py 2015-09-30 14:59:45 +02:00
Roland Haroutiounian
73a01889d2 PEP8/PyLint on test_component.py 2015-09-30 14:50:44 +02:00
Roland Haroutiounian
35d9d698b2 PEP8/PyLint on test_classes.py 2015-09-30 14:49:40 +02:00
Yann
06bd3b141d Model construct enhancement with backend and MH inheritance
Every backend and MH are now subclasses of dummy ones. This allow to check the type with issubclass.
2015-09-25 17:29:18 +02:00
Roland Haroutiounian
063e202e60 [#54] revert 2015-09-25 17:04:21 +02:00
Roland Haroutiounian
a225a63d2e [#54] Activated DjangoMigrationHandler to the tests of EmClass 2015-09-25 17:00:18 +02:00
Yann
5bccb6bae2 Updates on Model tests 2015-09-25 16:56:56 +02:00
Yann
7b1f3dca38 Add tests for Model
On create_component on delete_component on set_backend and on migrate_handler
2015-09-25 16:40:15 +02:00
Yann
eba33c3ecb Adding some tests for Model 2015-09-25 16:40:15 +02:00
Roland Haroutiounian
ebf07e197f [#54] Code cleaning 2015-09-24 17:14:57 +02:00
Roland Haroutiounian
4b42aaf282 [#54] Deleted the use of an obsolete exception 2015-09-24 16:45:59 +02:00
Roland Haroutiounian
896c7821ce [#54] added the migration handler in the testing process 2015-09-24 16:16:23 +02:00
Roland Haroutiounian
2813db64c5 [#54] Changed the test value for next id in the Editorial model used for tests 2015-09-24 16:13:43 +02:00
Roland Haroutiounian
6b6ea5e13b [#54] Changed the tests for EmClass 2015-09-24 16:13:43 +02:00
Roland Haroutiounian
3bb0dc70e1 [#54] Changed the expected id of a newly created class in the TestEmClassCreation class 2015-09-24 16:13:43 +02:00
ArnAud
332e771411 EmComponent : test_component less verbose 2015-09-24 15:45:37 +02:00
Yann
c37a5b5425 Put the django migration handler in dryrun (simulation) mode for EM tests 2015-09-24 15:37:08 +02:00
Yann
58837a0ed4 Fix modify_rank and associated tests
Now modify_rank don't raise anymore when too big/small modifier is given but do its best to make a valid modification
The modify_rank tests (and the __hash__ __cmp__ tests) has been modified to fit this new behavior
2015-09-24 15:28:25 +02:00
Yann
6fa5a2a7f6 Reimplementation of get_max_rank for EmComponent + little correction in hash test 2015-09-24 15:01:18 +02:00
ArnAud
9cc01fec46 EmComponent : lint + pep8 2015-09-24 14:35:46 +02:00
ArnAud
5f0f5dd3bf EmComponent: convert attr_dump attribut to a method 2015-09-24 12:20:20 +02:00
ArnAud
9b8bd12b65 Emtype-tests: whitespace and syntax error (lint + pep8) 2015-09-24 12:13:35 +02:00
ArnAud
90fcecd015 EmComponent: make the __hash__ function always return the same hash ! 2015-09-23 17:26:19 +02:00
ArnAud
6d0937d26e EmType : rewrite of the tests for EmTypes 2015-09-23 15:16:59 +02:00
ArnAud
2e1c517f01 testMe : add a fieldgroup with only optional field in it 2015-09-23 14:45:40 +02:00
ArnAud
644f76b14d Emtype: superiors_list should be a dict with list of int
=> a type can have multiple superiors (only instance of LeObject can have one)
2015-09-23 12:15:35 +02:00
ArnAud
e57598690d TestMe: add a type with no superior 2015-09-23 12:15:34 +02:00
ArnAud
2379d6031d Tests: add an unselected optional field to test ME 2015-09-23 12:15:34 +02:00
Roland Haroutiounian
bd6fa1e0e9 [#49] deleted an obsolete commented import 2015-09-23 11:35:26 +02:00
Roland Haroutiounian
e4dfc1bb7a [#49] Changes made in the unit tests for test_model 2015-09-23 09:34:43 +02:00
Yann
0861aadc78 Add some tests to EmComponent 2015-09-18 15:58:05 +02:00
ArnAud
9131f7bcd2 EmField: type attribute is now called fieldtype 2015-09-18 14:58:13 +02:00
Roland Haroutiounian
eaf0520d3b [#49] Changed the migration handler used in the tests for Model 2015-09-18 14:01:35 +02:00