summary refs log tree commit diff
path: root/tests/api (follow)
Commit message (Collapse)AuthorAgeFilesLines
* add testMatthew Hodgson2018-06-281-0/+33
|
* fix testsMatthew Hodgson2018-06-281-3/+15
|
* use jsonschema.FormatChecker for RoomID and UserID stringspik2017-03-231-4/+11
| | | | | | * use a valid filter in rest/client/v2_alpha test Signed-off-by: pik <alexander.maznev@gmail.com>
* Add valid filter tests, flake8, fix typopik2017-03-231-5/+49
| | | | Signed-off-by: pik <alexander.maznev@gmail.com>
* check_valid_filter using JSONSchemapik2017-03-231-1/+17
| | | | | | * add invalid filter tests Signed-off-by: pik <alexander.maznev@gmail.com>
* Optimise state resolutionErik Johnston2017-01-171-1/+4
|
* Prevent user tokens being used as guest tokens (#1675)Richard van der Hoff2016-12-061-15/+78
| | | | | Make sure that a user cannot pretend to be a guest by adding 'guest = True' caveats.
* Fix unit testsMark Haines2016-09-121-9/+9
|
* Record device_id in client_ipsRichard van der Hoff2016-07-201-1/+9
| | | | | Record the device_id when we add a client ip; it's somewhat redundant as we could get it via the access_token, but it will make querying rather easier.
* Bug fix: expire invalid access tokensNegar Fazeli2016-07-131-1/+30
|
* Create user with expiryNegi Fazeli2016-05-131-6/+6
| | | | | | - Add unittests for client, api and handler Signed-off-by: Negar Fazeli <negar.fazeli@ericsson.com>
* Test Filter.filter_roomsMark Haines2016-02-191-0/+18
| | | | | Also check that the __repr__ method for FilterCollection does something sensible.
* Fix flake8 warnings for testsMark Haines2016-02-193-10/+7
|
* Fix testErik Johnston2016-01-281-3/+4
|
* Fix testsErik Johnston2016-01-251-6/+4
|
* Fix testsErik Johnston2016-01-221-1/+1
|
* Introduce a Requester objectDaniel Wagner-Hall2016-01-111-6/+6
| | | | | | | | | This tracks data about the entity which made the request. This is instead of passing around a tuple, which requires call-site modifications every time a new piece of optional context is passed around. I tried to introduce a User object. I gave up.
* copyrightsMatthew Hodgson2016-01-071-1/+1
|
* Allow guests to upgrade their accountsDaniel Wagner-Hall2016-01-051-9/+9
|
* Allow guests to register and call /events?room_id=Daniel Wagner-Hall2015-11-041-3/+22
| | | | | | | This follows the same flows-based flow as regular registration, but as the only implemented flow has no requirements, it auto-succeeds. In the future, other flows (e.g. captcha) may be required, so clients should treat this like the regular registration flow choices.
* Refactor api.filtering to have a Filter APIErik Johnston2015-10-201-26/+31
|
* update filtering testsMark Haines2015-10-131-6/+6
|
* s/user_id/user/g for consistencyDaniel Wagner-Hall2015-09-011-4/+4
|
* Turn TODO into thing which actually will failDaniel Wagner-Hall2015-08-261-6/+9
|
* Attempt to validate macaroonsDaniel Wagner-Hall2015-08-261-2/+140
| | | | | | | | | | | | | A couple of weird caveats: * If we can't validate your macaroon, we fall back to checking that your access token is in the DB, and ignoring the failure * Even if we can validate your macaroon, we still have to hit the DB to get the access token ID, which we pretend is a device ID all over the codebase. This mostly adds the interesting code, and points out the two pieces we need to delete (and necessary conditions) in order to fix the above caveats.
* Stop looking up "admin", which we never readDaniel Wagner-Hall2015-08-251-2/+0
|
* Remove completely unused concepts from codebaseDaniel Wagner-Hall2015-08-251-5/+3
| | | | | | | | | | Removes device_id and ClientInfo device_id is never actually written, and the matrix.org DB has no non-null entries for it. Right now, it's just cluttering up code. This doesn't remove the columns from the database, because that's fiddly.
* s/by_token/by_access_token/gDaniel Wagner-Hall2015-08-201-8/+8
| | | | We're about to have two kinds of token, access and refresh
* Merge branch 'develop' into application-servicesKegan Dougal2015-02-111-12/+2
|\
| * Factor out some of the common homeserver setup code into aMark Haines2015-02-111-12/+2
| | | | | | | | setup_test_homeserver function in utils.
* | Remove unused imports.Kegan Dougal2015-02-091-2/+2
| |
* | Modify auth.get_user_by_req for authing appservices directly.Kegan Dougal2015-02-091-0/+139
|/ | | | | | Add logic to map the appservice token to the autogenned appservice user ID. Add unit tests for all forms of get_user_by_req (user/appservice, valid/bad/missing tokens)
* Create a separate filter object to do the actual filtering, so that we canMark Haines2015-01-291-51/+57
| | | | | split the storage and management of filters from the actual filter code and don't have to load a filter from the db each time we filter an event
* Add filter_room_state unit tests.Kegan Dougal2015-01-291-0/+56
|
* Add basic filtering public API unit tests. Use defers in the right places.Kegan Dougal2015-01-291-1/+53
|
* Add more unit tests for the filter algorithm.Kegan Dougal2015-01-291-5/+259
|
* Implement filter algorithm. Add basic event type unit tests to assert it works.Kegan Dougal2015-01-291-1/+44
|
* Add filter JSON sanity checks.Kegan Dougal2015-01-281-4/+20
|
* Initial stab at real SQL storage implementation of user filter definitionsPaul "LeoNerd" Evans2015-01-271-1/+18
|
* Have the Filtering API return Deferreds, so we can do the Datastore ↵Paul "LeoNerd" Evans2015-01-271-2/+3
| | | | implementation nicely
* Initial trivial unittest of Filtering objectPaul "LeoNerd" Evans2015-01-271-0/+67
|
* Have all unit tests import from our own subclass of trial's unittest ↵Paul "LeoNerd" Evans2014-09-121-1/+1
| | | | TestCase; set up logging in ONE PLACE ONLY
* Test ratelimiterMark Haines2014-09-022-0/+39