Yann Weber
3ae2e6e613
Moved all modules related to DB in the DataSource folder ( fixes #88 )
vor 9 Jahren
ArnAud
eb8d282857
test Model: char fields should be nullable
vor 9 Jahren
Yann Weber
10379c6a95
Fieldgroups are deleted
vor 9 Jahren
Yann Weber
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
vor 9 Jahren
Yann Weber
7b0df11496
Removing rel2type fields and rel2type attributes fields from LeClass and LeType fields lists
vor 9 Jahren
Yann Weber
76782b1b5b
BugFix in Model tests
An old string was given as argument to DummyMigrationHandler and was interpreted as debug = True
vor 9 Jahren
Yann Weber
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
vor 9 Jahren
ArnAud
a4dacc654a
classtype: use the same naming pattern for *_id fields
vor 9 Jahren
Yann Weber
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.
vor 9 Jahren
Yann Weber
9df9095da3
Add a test for EmField
Checking that internal='object' is reserved for common fields
vor 9 Jahren
Yann Weber
94d4967642
Add common_fields and make the differences between common fields and default fields
vor 9 Jahren
Yann Weber
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
vor 9 Jahren
Yann Weber
b521c2c7b6
Modified EmField and Model to fit with the new fieldtypes
vor 9 Jahren
Yann Weber
a9bf80d83d
Adding a second possible parent for the EmType rubrique in me.json
vor 9 Jahren
ArnAud
6890375041
Databases: get rid of old and unused code
vor 9 Jahren
ArnAud
f303c0c241
start of lodel1 migration tool
vor 9 Jahren
Yann Weber
abb700b0c0
Added 2 invalid params for emclass_from_name() method
vor 9 Jahren
Yann Weber
ea51650ab3
Added tests on Types hierarchy and selected field for migrate_handler() method
vor 9 Jahren
Roland Haroutiounian
2ea37c3112
PEP8/PyLint on test_types.py
vor 9 Jahren
Roland Haroutiounian
233ce905fc
PEP8/PyLint on test_model.py
vor 9 Jahren
Roland Haroutiounian
73a01889d2
PEP8/PyLint on test_component.py
vor 9 Jahren
Roland Haroutiounian
35d9d698b2
PEP8/PyLint on test_classes.py
vor 9 Jahren
Yann Weber
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.
vor 9 Jahren
Roland Haroutiounian
063e202e60
[#54 ] revert
vor 9 Jahren
Roland Haroutiounian
a225a63d2e
[#54 ] Activated DjangoMigrationHandler to the tests of EmClass
vor 9 Jahren
Yann Weber
5bccb6bae2
Updates on Model tests
vor 9 Jahren
Yann Weber
7b1f3dca38
Add tests for Model
On create_component on delete_component on set_backend and on migrate_handler
vor 9 Jahren
Yann Weber
eba33c3ecb
Adding some tests for Model
vor 9 Jahren
Roland Haroutiounian
ebf07e197f
[#54 ] Code cleaning
vor 9 Jahren
Roland Haroutiounian
4b42aaf282
[#54 ] Deleted the use of an obsolete exception
vor 9 Jahren
Roland Haroutiounian
896c7821ce
[#54 ] added the migration handler in the testing process
vor 9 Jahren
Roland Haroutiounian
2813db64c5
[#54 ] Changed the test value for next id in the Editorial model used for tests
vor 9 Jahren
Roland Haroutiounian
6b6ea5e13b
[#54 ] Changed the tests for EmClass
vor 9 Jahren
Roland Haroutiounian
3bb0dc70e1
[#54 ] Changed the expected id of a newly created class in the TestEmClassCreation class
vor 9 Jahren
ArnAud
332e771411
EmComponent : test_component less verbose
vor 9 Jahren
Yann Weber
c37a5b5425
Put the django migration handler in dryrun (simulation) mode for EM tests
vor 9 Jahren
Yann Weber
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
vor 9 Jahren
Yann Weber
6fa5a2a7f6
Reimplementation of get_max_rank for EmComponent + little correction in hash test
vor 9 Jahren
ArnAud
9cc01fec46
EmComponent : lint + pep8
vor 9 Jahren
ArnAud
5f0f5dd3bf
EmComponent: convert attr_dump attribut to a method
vor 9 Jahren
ArnAud
9b8bd12b65
Emtype-tests: whitespace and syntax error (lint + pep8)
vor 9 Jahren
ArnAud
90fcecd015
EmComponent: make the __hash__ function always return the same hash !
vor 9 Jahren
ArnAud
6d0937d26e
EmType : rewrite of the tests for EmTypes
vor 9 Jahren
ArnAud
2e1c517f01
testMe : add a fieldgroup with only optional field in it
vor 9 Jahren
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)
vor 9 Jahren
ArnAud
e57598690d
TestMe: add a type with no superior
vor 9 Jahren
ArnAud
2379d6031d
Tests: add an unselected optional field to test ME
vor 9 Jahren
Roland Haroutiounian
bd6fa1e0e9
[#49 ] deleted an obsolete commented import
vor 9 Jahren
Roland Haroutiounian
e4dfc1bb7a
[#49 ] Changes made in the unit tests for test_model
vor 9 Jahren
Yann Weber
0861aadc78
Add some tests to EmComponent
vor 9 Jahren