summaryrefslogtreecommitdiff
path: root/test/ext/test_associationproxy.py
Commit message (Collapse)AuthorAgeFilesLines
* - Fixed bug in association proxy where an any()/has()Mike Bayer2015-04-281-2/+28
| | | | | | | on an relationship->scalar non-object attribute comparison would fail, e.g. ``filter(Parent.some_collection_to_attribute.any(Child.attr == 'foo'))`` fixes #3397
* - Fixed more regressions caused by NEVER_SET; comparisonsMike Bayer2015-04-201-10/+13
| | | | | | | | | to transient objects with attributes unset would leak NEVER_SET, and negated_contains_or_equals would do so for any transient object as the comparison used only the committed value. Repaired the NEVER_SET cases, fixes #3371, and also made negated_contains_or_equals() use state_attr_by_column() just like a non-negated comparison, fixes #3374
* Fix slice addressing of _AssociationList with python3Gilles Dartiguelongue2015-03-101-0/+16
|
* - ensure all tests are named test_*Mike Bayer2014-07-301-1/+1
|
* - critically, py.test for unknown reasons *SKIPS* tests that have an ↵Mike Bayer2014-05-021-27/+7
| | | | | | __init__() method. No clue. nosetests doesn't do this. concerning that other tests might have the same issue.
* - Fixed bug in association proxy where assigning an empty sliceMike Bayer2014-03-041-0/+7
| | | | (e.g. ``x[:] = [...]``) would fail on Py3k.
* - Fixed a regression in association proxy caused by :ticket:`2810` whichMike Bayer2014-02-271-1/+31
| | | | | | | | | caused a user-provided "getter" to no longer receive values of ``None`` when fetching scalar values from a target that is non-present. The check for None introduced by this change is now moved into the default getter, so a user-provided getter will also again receive values of None. re: #2810
* - catch the metadata on ScalarTest.test_scalar_proxy, this has been leaving ↵Mike Bayer2013-10-251-11/+47
| | | | | | | | itself around for a long time - association proxy now returns None for proxied scalar that is also None, rather than raising AttributeError. [ticket:2810]
* correct for missing fail() methods which were lost when we removed ↵Mike Bayer2013-08-261-25/+20
| | | | unittest.TestCase
* clean up formatting and other linting issuesMike Bayer2013-08-261-52/+51
|
* also clarified the changelog regarding Cls.scalar != 'value'Mike Bayer2013-06-081-11/+11
|
* Added additional criterion to the ==, != comparators, used withMike Bayer2013-06-081-20/+148
| | | | | | | | | | | | | | | | | | | scalar values, for comparisons to None to also take into account the association record itself being non-present, in addition to the existing test for the scalar endpoint on the association record being NULL. Previously, comparing ``Cls.scalar == None`` would return records for which ``Cls.associated`` were present and ``Cls.associated.scalar`` is None, but not rows for which ``Cls.associated`` is non-present. More significantly, the inverse operation ``Cls.scalar != None`` *would* return ``Cls`` rows for which ``Cls.associated`` was non-present. Additionally, added a special use case where you can call ``Cls.scalar.has()`` with no arguments, when ``Cls.scalar`` is a column-based value - this returns whether or not ``Cls.associated`` has any rows present, regardless of whether or not ``Cls.associated.scalar`` is NULL or not. [ticket:2751]
* - the raw 2to3 runMike Bayer2013-04-271-16/+16
| | | | - went through examples/ and cleaned out excess list() calls
* - these pickle the assoc proxy by itself tests can't really passMike Bayer2013-04-201-6/+12
| | | | | now without strong ref on the parent - fix message compare for py3k
* trying different approaches to test layout. in this one, the testing modulesMike Bayer2012-09-271-6/+6
| | | | | | | become an externally usable package but still remains within the main sqlalchemy parent package. in this system, we use kind of an ugly hack to get the noseplugin imported outside of the "sqlalchemy" package, while still making it available within sqlalchemy for usage by third party libraries.
* -whitespace bonanza, contdMike Bayer2012-07-281-8/+8
|
* fix import hereMike Bayer2012-04-241-5/+5
|
* - Changed the update() method on association proxyMike Bayer2011-09-141-2/+62
| | | | | | | | dictionary to use a duck typing approach, i.e. checks for "keys", to discern between update({}) and update((a, b)). Previously, passing a dictionary that had tuples as keys would be misinterpreted as a sequence. [ticket:2275]
* - rewrite the docs for association proxy using declarative, add new ↵Mike Bayer2011-08-051-2/+29
| | | | | | | | examples, querying, etc., part of [ticket:2246] - add some accessors to AssociationProxy for attributes, test in join(), [ticket:2236] - update relationship docs to talk about callables, part of [ticket:2246]
* - remove test.sql._base, test.engine._base, test.orm._base, move those ↵Mike Bayer2011-03-271-6/+6
| | | | | | | classes to a new test.lib.fixtures module - move testing.TestBase to test.lib.fixtures - massive search and replace
* - move all the setup_classes(cls) and setup_mappers(cls) to use aMike Bayer2011-03-271-4/+4
| | | | | local cls.Basic, cls.Comparable base class so that there is no ambiguity or hash identity behaviors getting in the way of class registration.
* - remove @testing.resolve_artifact_names, replace with direct attributeMike Bayer2011-03-261-18/+52
| | | | | | | access to the cls/self.tables/classes registries - express orm/_base.py ORMTest in terms of engine/_base.py TablesTest, factor out common steps into TablesTest, remove AltEngineTest as a separate class. will further consolidate these base classes
* - Association proxy now has correct behavior forMike Bayer2011-02-131-48/+117
| | | | | | | any(), has(), and contains() when proxying a many-to-one scalar attribute to a one-to-many collection (i.e. the reverse of the 'typical' association proxy use case) [ticket:2054]
* - whitespace removal bonanzaMike Bayer2011-01-021-7/+7
|
* - move sqlalchemy.test to test.libMike Bayer2010-11-151-3/+3
|
* tidy test/base, test/ex, test/extMike Bayer2010-07-111-126/+137
|
* - converted all lazy=True|False|None to 'select'|'joined'|'noload'Mike Bayer2010-03-241-7/+7
| | | | | - converted all eager to joined in examples - fixed beaker/advanced.py to reference RelationshipCache
* - The official name for the relation() function is nowMike Bayer2010-03-171-15/+15
| | | | | | relationship(), to eliminate confusion over the relational algebra term. relation() however will remain available in equal capacity for the foreseeable future. [ticket:1740]
* - fix the sqlalchemy.test.schema.Column function to work with copiesMike Bayer2010-03-111-2/+2
| | | | | - add sequences to new associationproxy tests - test/ext passes 100% on oracle here
* - association_proxy now has basic comparator methods .any(),Mike Bayer2010-01-221-1/+169
| | | | | .has(), .contains(), ==, !=, thanks to Scott Torborg. [ticket:1372]
* - The signature of the proxy_factory callable passed toMike Bayer2009-12-081-0/+51
| | | | | | | | association_proxy is now (lazy_collection, creator, value_attr, association_proxy), adding a fourth argument that is the parent AssociationProxy argument. Allows serializability and subclassing of the built in collections. [ticket:1259]
* merge 0.6 series to trunk.Mike Bayer2009-08-061-3/+3
|
* - The collection proxies produced by associationproxy are nowMike Bayer2009-07-251-18/+82
| | | | | | pickleable. A user-defined proxy_factory however is still not pickleable unless it defines __getstate__ and __setstate__. [ticket:1446]
* - unit tests have been migrated from unittest to nose.Mike Bayer2009-06-101-0/+885
See README.unittests for information on how to run the tests. [ticket:970]