l.c.i.FakeStore : class documentation

Part of lp.codehosting.inmemory View In Hierarchy

Fake store that implements find well enough to pass tests.

This is needed because some of the test_codehosting tests use assertSqlAttributeEqualsDate, which relies on ORM behaviour. Here, we fake enough of the ORM to pass the tests.

Method __init__ Undocumented
Method find Implement Store.find that takes two attributes: id and one other.
def __init__(self, object_set):
Undocumented
def find(self, cls, **kwargs):
Implement Store.find that takes two attributes: id and one other.

This is called by assertSqlAttributeEqualsDate, which relies on find returning either a single match or None. Returning a match implies that the given attribute has the expected value. Returning None implies the opposite.

API Documentation for Launchpad, generated by pydoctor at 2022-06-16 00:00:12.