- 22 Mar, 2019 1 commit
-
-
Denis Laxalde authored
-
- 30 Nov, 2017 1 commit
-
-
Denis Laxalde authored
Previously, setting a computed relation upon entity creation or modification (using the ORM or an RQL query) would usually fail with an operational error in the backend ("no such table"). However, under some mysterious circumstances (like passing a string as value in cw_set for a computed relation), the RQL to SQL transformation would simply drop the clause. To prevent this to happen, we add a check for computed relation before adding a relation to an execution plan. This check raises a QueryError. It happens in several places: * in querier.InsertPlan.add_relation_def() (called from several places in ssplanner steps) for INSERT queries, * in ssplanner.UpdateStep.execute() for SET queries and, * in ssplanner.SSplanner.build_delete_plan() for DELETE queries. Tests added to unittest_querier.py because unittest_sslplanner.py looked inappropriate (it has only unit tests) and the former already had a NonRegressionTC class.
-
- 03 Nov, 2017 2 commits
-
-
Sylvain Thénault authored
This is probably only necessary for QuerierTC itself, move it there and drop incantation from other derived classes to deactivate this feature.
-
Sylvain Thénault authored
This used to crash because of an attempt to access unexisting table. Closes #17113286 --HG-- branch : 3.25
-
- 15 Mar, 2017 1 commit
-
-
Sylvain Thénault authored
so it's consistent with CubicWebTC and avoid access to a protected attribute which has been exposed by the removal of the 'session' property a few csets earlier.
-
- 10 Mar, 2017 2 commits
-
-
Sylvain Thénault authored
which should be not necessary anymore, beside two remaining usage in our own test suite.
-
Sylvain Thénault authored
-
- 05 Oct, 2016 1 commit
-
-
Sylvain Thénault authored
This was not necessary anymore with promoted usage of the new data import API. Turn repository's _type_extid_cache to _type_cache with only the entity's type as key. This introduces an backward incompatible change: entity_metas dict doesn't contains anymore the extid key, but it doesn't seem used at all anywhere, so this sounds acceptable. Closes #15538317
-
- 11 Oct, 2016 1 commit
-
-
Sylvain Thénault authored
-
- 06 Oct, 2016 1 commit
-
-
Sylvain Thénault authored
Having TestServerConfiguration and alike in the test module namespace causes pytest discovery errors, because it thinks it's a test class.
-
- 30 Sep, 2016 1 commit
-
-
Sylvain Thénault authored
* update some copyright * drop most __docformat__ declaration * fix some flake8 warnings / errors
-
- 20 May, 2016 1 commit
-
-
Sylvain Thénault authored
Specify module's __file__ instead of apphome. __file__ is saved on the class as it will be used later (eg to find the proper pg cluster without relying on shared dictionnary modifications). This will require some tests update, but it should be less common in cubes than in cubicweb itself.
-
- 16 Jan, 2016 1 commit
-
-
Denis Laxalde authored
Basically: mkdir cubicweb hg mv *.py -X setup.py cubicweb hg mv dataimport devtools entities etwist ext hooks i18n misc schemas server skeleton sobjects test web wsgi cubicweb Other changes: * adjust path to cubicweb-ctl in devtools tests * update setup.py to avoid importing __pkginfo__ (exec it instead), replace os.path.walk by os.walk and prepend `modname` here and there * update tox.ini to account for new test locations * update doc/conf.py so that it still finds __pkginfo__.py and CWDIR in doc/Makefile
-
- 11 Jun, 2014 1 commit
-
-
Aurelien Campeas authored
It has been deprecated in a previous changeset and is now a no-op. Related to #2919309.
-
- 10 Jun, 2014 1 commit
-
-
Aurelien Campeas authored
Connection replaces ClientConnection everywhere. Some notes: * testlib: .client_cnx and .repo_cnx become aliases of .cnx (we might not want to tell people to update their tests again for just no real benefit, so we'll live with these aliases for a while) * entity.as_rset must not be cached because we risk caching result sets having a Connection object as .req (helps unittest_breadcrumbs) * entity._cw_dont_cache_attributes loses its repo/request special paths and only keeps its storage/bfss user (this helps unittest_wfobjs) * moreover, entity.cw_instantiate and .cw_set stop overriding the attributes cache *after* the before_*_entity hooks have run, because there is no need to (it is now actually harmful to do it and unittest_hooks.test_html_tidy* tests remain green because of this) * rset._build_entity sticks its .req onto the entity just fetched from the cache, because otherwise it might carry a _cw that is a Connection object where a Request is expected (helps unittest_views_actions) * we get overall better cache usages (entity caches were split over Request + ClientConnection and Connection), hence the changes unittest_entity and unittest_wfobjs * void the ecache when providing the cnx to a request object Having the entity cache pre-filled when we bind it to the request object hurts because these entities are bound to Connection objects, that lack e.g. `.form` or `.add_js` and crash the views subsystem. Thus, the unittest_testlib.test_error_raised test will are kept green. Closes #3837233
-
- 28 Jan, 2014 1 commit
-
-
Aurelien Campeas authored
If an attribute has more permissive security rules than the entity type itself, we should be green and not deny action because of an early global entity permission check (with the more restrictive rules). Only if one attribute with the entity-level permission rules is edited will the global check be performed. Note: * the "if action == 'delete'" check at the entry of check_entity_attributes is a guard for a condition currently not happening in cubicweb itself (but application hooks could conceivably call this function with a 'delete' action) Closes #3489895. --HG-- branch : stable
-
- 20 Dec, 2013 1 commit
-
-
Sylvain Thénault authored
0542a85fe667 replacing SQL OR by hooks for symmetric relations allows that. This involve a single test value change for a border case: when querying a symmetric relation without specifying the subject nor the object, you may get some duplicated result. IMO this is fine to let the user explicitly use DISTINCT or not and to remove the dedicated handling we had which didn't let any choice. Related to #3259713
-
- 08 Jan, 2014 1 commit
-
-
Aurelien Campeas authored
We now provide a more compact indexname, using the schema constraint entity type and the position of the columns set in the entity type unique constraints list. This avoids a nasty name truncation issue. The UniqueTogetherError object is made smarter: it computes the rtypes, abstracting the underlying backend (pg/sqlserver vs sqlite). The `user friendly` adapter is much simplified since there is no longer any truncation issue. Uses a new logilab.database version (ticket #151507) and a new yams version (ticket #189299) Closes #2514939 [jcr: disable hooks when temporarily dropping CWUniqueTogetherConstraint entities]
-
- 03 Dec, 2013 1 commit
-
-
Julien Cristau authored
Don't override passed-in descriptions in ResultSet.__init__, even if they're empty. --HG-- branch : stable
-
- 09 Oct, 2013 1 commit
-
-
Julien Cristau authored
It's more consistent, and avoids pylint warning "Instance of 'tuple' has no 'append' member" --HG-- branch : stable
-
- 29 Jan, 2014 1 commit
-
-
Julien Cristau authored
They don't actually need a session, so let's make that clear.
-
- 24 Oct, 2013 1 commit
-
-
Julien Cristau authored
--HG-- branch : stable
-
- 31 Jul, 2013 1 commit
-
-
Sylvain Thénault authored
when some neged relation is involved. Closes #3058527. --HG-- branch : stable
-
- 01 Jul, 2013 1 commit
-
-
Sylvain Thénault authored
Related to #2919300 (almost done!)
-
- 22 Jan, 2014 1 commit
-
-
Sylvain Thénault authored
since it now handles a connection to the system source only Related to #2919300 [jcr: adjust 3.17.11 migration, fix a number of bugs in new ConnectionsSet implementation, fix source.{open,close}_source_connections]
-
- 08 Apr, 2013 1 commit
-
-
Adrien Di Mascio authored
_extract_eid_consts() implementation must consider arithmetic operators when trying to associate rql variables to specific eids. --HG-- branch : oldstable
-
- 28 Aug, 2014 1 commit
-
-
Lea Capgen authored
We now: * have CWComputedRelation in the bootstrap schema to store computed relations * properly serialize/deserialize it * test first if the database has been migrated and contains the related table Related to #3546717 [jcr: adjust unittest_querier to pass with the added entity type]
-
- 14 Feb, 2013 1 commit
-
-
Nicolas Chauvat authored
They are unneeded since we dropped python 2.5 compatibility. This will help Python 3.3 experimentation.
-
- 26 Nov, 2012 1 commit
-
-
Pierre-Yves David authored
There is no self.transaction of TestCase. I assumed the test writer meant a session. This seems to make the test pass.
-
- 10 Sep, 2012 1 commit
-
-
Sylvain Thénault authored
-
- 10 Apr, 2012 2 commits
-
-
Sylvain Thénault authored
--HG-- branch : stable
-
Sylvain Thénault authored
[test] use setUpClass rather than setUpModule to avoid inter-dependency pb with CubicWebTC sub-classes --HG-- branch : stable
-
- 05 Apr, 2012 1 commit
-
-
David Douard authored
--HG-- branch : stable
-
- 26 Mar, 2012 1 commit
-
-
Sylvain Thénault authored
[rql annotation] fix has_text_query detection (if coming from sub-query and if has_text on a column aliases. Closes #2275322 --HG-- branch : stable
-
- 16 Mar, 2012 1 commit
-
-
Sylvain Thénault authored
Administrator should ask their users to reenter new password so they benefit from the new encryption. Also, new encryption is cross-platform compatible, eg you may now move an instance from windows to linux painlessly --HG-- branch : stable
-
- 13 Feb, 2012 1 commit
-
-
Sylvain Thénault authored
-
- 12 Dec, 2011 1 commit
-
-
Sylvain Thénault authored
[rql2sql] None for attributes in kwargs generate IS NULL, so should be considered in sql cache key. Closes #2116693 --HG-- branch : stable
-
- 05 Dec, 2011 1 commit
-
-
Julien Cristau authored
-
- 25 Oct, 2011 2 commits
-
-
Sylvain Thénault authored
-
Sylvain Thénault authored
-