Yann Weber
889abc8547
Put the database configuration asinstance attribute of EmComponent
9 anni fa
Yann Weber
e757a3fb90
Doing todo
Added a dummy EmFieldType_icon
Added a test for EmType deletion with superiors
9 anni fa
Roland Haroutiounian
b03958a65a
Suppression de sqlutils.getEngine au profit de sqlutils.get_engine
9 anni fa
Yann Weber
49dfe9ad03
Code factorization on EmComponent.modify_rank()
Changed beahvior : when a 'non-change' is asked (like +0 -0 or set ranke to actual rank) don't raise an Error
9 anni fa
Yann Weber
f41d164603
Added test for EmComponent.get_max_rank(), replacing the default value for rank by the one processed by get_max_rank
9 anni fa
Yann Weber
6af0b45f3f
Code factorization on EmType select and unselect fields. Added comparison capabilities to EmComponent (and childs)
Implemented __hash__ and __eq__ for EmComponent (based on class name and uid) to test equality betwenn two instance. Allows to use "instance in instance_list" syntax
9 anni fa
Yann Weber
27d178e531
Code factorization and create methods for EmComponent and childs changes
Behaviour changed for EmComponent and childs create method :
- Takes care of duplicated names at creation
- Handle all the checks in EmComponent method
Factorization of EmField.get_class_table() method
Added a @property method class_table_name to EmClass
9 anni fa
Yann Weber
166dc6ad75
Added docstrings comments to tests and fixed "false hidden failure"
Added docstrings comments to tests (for fancy output with -v ).
Fixed strange hidden failure that make tests stops on non failed tests with -f option. Those false failure seems to comes from with self.subTest blocs with functions calls that does assertion.
9 anni fa
Yann Weber
a3b9daf319
sqlwrapper deletion and sqlsetup enhancement
Moved the database initialisation functionnality to sqlsetup and fixed all the code to handle the sqlwrapper deletion
9 anni fa
Yann Weber
4fb2f789b5
Replacing EmComponent method getDbE by db_engine
9 anni fa
Yann Weber
65b10a6c5d
Added some tests to tests_types.py
Added hierarchy tests
9 anni fa
Yann Weber
503ecd570b
Some tests dont pass, but most of them does
9 anni fa
Yann Weber
16a962fb3f
Implemented DropColumn for sqlite
9 anni fa
ArnAud
b7eb53c98a
ME test: changement de nom de fonction : new_uid
9 anni fa
Roland Haroutiounian
f503dab46a
Implémentation d'un test sur le delete de type
9 anni fa
Yann Weber
a042306c14
Delete implementation for EmClass and EmField
The EmField version cannot be tested yet (drop column not yet implemented for sqlite in Database.sqlalter)
9 anni fa
Yann Weber
6359adc0f4
Added tests for EmField.delete() and EmClass.delete()
Also add a new function is sqlutils to execute ddl
9 anni fa
Roland Haroutiounian
1d66177f8a
Suppression du rel_to_type dans le test EmField create
9 anni fa
Roland Haroutiounian
61893313af
Tests EmType
9 anni fa
ArnAud
96bfee8baa
test, fieldgroups: no use of subtest
9 anni fa
Roland Haroutiounian
31e5448694
Ajout des tests sur la classe EmType
9 anni fa
Roland Haroutiounian
1ab80e9b1c
[#11 ] Suppression de tests inutiles dans test_field
9 anni fa
ArnAud
caef4dd72f
EM test EmClass: test link_type() and linked_types()
9 anni fa
Roland Haroutiounian
d9c3f8e86c
[#11 ] Modification de la méthode create => passage en arguments positionnels
9 anni fa
Roland Haroutiounian
62d2a978fb
[#11 ] Finalisation des tests sur Field (debuggage du process de test)
9 anni fa
Roland Haroutiounian
0418bd4895
[#12 ] Modification et débuggage sur le process de création de fields
9 anni fa
Roland Haroutiounian
9181acb0b2
[#12 ] Modification sur le nom de la base de test (avant passage à la classe test utils)
9 anni fa
Roland Haroutiounian
e9d49533f2
[#12 ] Correctifs sur le populate et le save de EmField
9 anni fa
Roland Haroutiounian
0751eb26e8
[#12 ] Modification du setup de test pour test_field
9 anni fa
Roland Haroutiounian
b69b21b431
[#12 ] debug
9 anni fa
Yann Weber
302382d488
Created EditorialModel tests database utilities
9 anni fa
ArnAud
c8d8c34710
EM: test classes : test for EmClass.fields()
9 anni fa
Roland Haroutiounian
2a9335f202
[#12 ] Déplacement des méthodes select_field et unselect_field de fields vers types
9 anni fa
Roland Haroutiounian
f13b6f844d
[#12 ] Ajout de la class Em_Field_Type et du select_field
9 anni fa
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
9 anni fa
ArnAud
007a04ca2a
EmClass: test of types(), use uid instead of id
9 anni fa
Roland Haroutiounian
e6f6720a57
[#11 ] Ajout des premiers tests sur EmField
9 anni fa
Yann Weber
5340fde711
Added tests for EmComponent's delete() function
9 anni fa
ArnAud
c3e18b1aa9
EM test classes: test of EmClass.fielgroups()
9 anni fa
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)
9 anni fa
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, +=, -=, *=, /=, +, -, *, /, %, ...)
9 anni fa
ArnAud
b587f38e32
EM, test: test creation of EmClass
9 anni fa
Yann Weber
94e8474185
Bugfixes is some tests
9 anni fa
Yann Weber
25e5858ba2
Syntax error fixes
9 anni fa
Yann Weber
69f948affd
Added test for create, init and fields
Maybe very bugy
9 anni fa
Yann Weber
c4ed3ee8de
First commit for EmFieldGroup tests
Written some test setup and the begining of the __init__ test
9 anni fa
Yann Weber
a9757a4672
Disabling annoying warnings in sqlwrapper and fixing a bug in test_components
Using sqlite db in test_components
9 anni fa
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
9 anni fa
Yann Weber
a27f735b48
Writed tests from EmComponent.create()
9 anni fa
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
9 anni fa