Yann Weber
5dbe064b95
EmType.fields() implementation
Changed comments about EmFieldGroup.fields()
10 years ago
Yann Weber
c46d94dc1c
EmType.field_groups function implementation
10 years ago
Yann Weber
b45e7ea4ee
Added an getTable function to sqlutils
It takes an EmComponent child class as parameter and return an sqlalchemy Table
10 years ago
Yann Weber
b951a0328f
Normalized EmType comments
10 years ago
Driky
91ea809d5b
Correction de Component.modify_rank()
Passe tous les tests
10 years ago
Driky
39c63f8ee3
Correction des cas sign = + ou - sur modify rank et creation de get_max_rank()
10 years ago
ArnAud
22dad9b673
EmType: __init__(), save() and populate() new gen
10 years ago
Yann Weber
302382d488
Created EditorialModel tests database utilities
10 years ago
ArnAud
958c9a9191
EmClasses: implementation of EmClass.fields()
10 years ago
ArnAud
c8d8c34710
EM: test classes : test for EmClass.fields()
10 years ago
Roland Haroutiounian
9140b1b5b1
Merge branch 't12'
10 years ago
Roland Haroutiounian
b0a9a2fa3b
[#12 ] Modification de l'appel au getDbe
Récupération dans EmComponent directement
10 years ago
Roland Haroutiounian
8e7a7ffe34
[#12 ] Modification de la classe EmField
Suppression du init et passage des classes plutôt que les instances pour les fieldtypes dans le _fields
10 years ago
Roland Haroutiounian
e1d7a88335
[#12 ] Modification de la déclaration des champs de la classe Em_Field_Type
10 years ago
Roland Haroutiounian
2a9335f202
[#12 ] Déplacement des méthodes select_field et unselect_field de fields vers types
10 years ago
Roland Haroutiounian
77fc59fd40
[#12 ] Suppression de deux imports inutiles dans le module fields_types
10 years ago
Roland Haroutiounian
816f33ece3
[#12 ] Ajout du module fields_types
10 years ago
Roland Haroutiounian
f13b6f844d
[#12 ] Ajout de la class Em_Field_Type et du select_field
10 years ago
Yann Weber
00614d90e9
New way to specify _fields and table in EmComponent's child classes
Now _fields and table MUST be class attribute.
Its important to note that _fields now consist in a list of (name, ftype) tuples and that ftype is a EmFieldType class and NOT an EmFieldType instance
10 years ago
ArnAud
007a04ca2a
EmClass: test of types(), use uid instead of id
10 years ago
ArnAud
98b1dc455f
EmClass: import EditorialModel module. use uid instead of id
10 years ago
Roland Haroutiounian
e6f6720a57
[#11 ] Ajout des premiers tests sur EmField
10 years ago
Roland Haroutiounian
c017ae793e
[#11 ] Implémentation du _fields dans EmField
10 years ago
Roland Haroutiounian
99ca81cdc3
[#11 ] Correction sur le champ identifiant des fieldgroup dans la définition d'un field
10 years ago
Roland Haroutiounian
4b32798c49
[#11 ] Nettoyage de code
10 years ago
Roland Haroutiounian
ef00ce2250
[#11 ] Correction pour l'argument du From
10 years ago
Roland Haroutiounian
6442a85014
[#11 ] Modification du passage d'arguments sur la méthode create de components
10 years ago
Roland Haroutiounian
21f79a9301
[#11 ] Ajout de la génération de la colonne du Field dans la table correspondante
10 years ago
Yann Weber
5340fde711
Added tests for EmComponent's delete() function
10 years ago
ArnAud
c3e18b1aa9
EM test classes: test of EmClass.fielgroups()
10 years ago
Yann Weber
6c8b10955d
Cleaning and optimizing tests
Cleaning code for EmComponent
Optimizing tests for EmComponent and EmFieldGroup (running initDb in setUpModule and make a backup copy, the backup is restored in setUp)
10 years ago
Yann Weber
80e82073fc
Bugfixes on EmComponent
- Now except for the modify_rank tests test_component didn't fails
- Added simple integer operation capabilities to EmFieldType_integer ( int cast, +=, -=, *=, /=, +, -, *, /, %, ...)
10 years ago
ArnAud
b587f38e32
EM, test: test creation of EmClass
10 years ago
Yann Weber
690b68d714
Small bugfix in components.py
10 years ago
Yann Weber
c74f65ac55
Normalize comments for MlString
10 years ago
Yann Weber
e8a2362d21
Normalize comments for EmFieldGroups
10 years ago
Yann Weber
ff72825720
Normalize comments for components.py
10 years ago
Yann Weber
94e8474185
Bugfixes is some tests
10 years ago
Yann Weber
25e5858ba2
Syntax error fixes
10 years ago
Yann Weber
69f948affd
Added test for create, init and fields
Maybe very bugy
10 years ago
Yann Weber
c4ed3ee8de
First commit for EmFieldGroup tests
Written some test setup and the begining of the __init__ test
10 years ago
Yann Weber
e79e583dfd
Bugfix in EmFieldGroup
- Added a _fields property (also added it as class property, but the way its done is not satisfactory... we want an ordered dict and not a tuple list as class property)
- Its now allowed to give an uid or a name as em_class for EmFieldGroup.create(name, em_class).
- Now when EmFieldGroup.create is called with an existing name it raises an error (ValueError)
- Removed EmFieldGroup.populate and EmFieldGroup.save
10 years ago
Yann Weber
712a2710a0
Added __eq__ to MlString
Now an MlString instance is able to say if another MlString instance is equivalent using mlstr1 == mlstr2
10 years ago
Yann Weber
a9757a4672
Disabling annoying warnings in sqlwrapper and fixing a bug in test_components
Using sqlite db in test_components
10 years ago
ArnAud
ac6a2883f2
EmComponents: close db connexion after fetching (sqlite issue)
10 years ago
Yann Weber
97c6b41e88
Close #31
EmComponent.create() now takes keywords arguments corresponding to the _fields property of the calling class
WARNING !!! Hardcoded rank = -1 at component creation and Hardcoded 0 as default value for EmClass icon
10 years ago
Yann Weber
a27f735b48
Writed tests from EmComponent.create()
10 years ago
Driky
615bfc5a81
EM Component.py Commentaire
Correction du bloc de mcommentaire de class encore sous l'ancien modèle.
10 years ago
Driky
a611b08e37
EM Component.py modify_rank
remplacement des self.id restant par self.uid
10 years ago
Yann Weber
e3b4e6ee74
Modified EmComponent's tests to fit with the new EmComponent class
Changed id in uid and changed the dummy class for testing
10 years ago