summary refs log tree commit diff
path: root/tests/utils.py (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Add config variables for enabling terms auth and the policy name (#4142)Travis Ralston2018-11-061-0/+2
| | | | So people can still collect consent the old way if they want to.
* Merge branch 'develop' into matthew/autocreate_autojoinNeil Johnson2018-10-041-51/+61
|\
| * Disable frozen dicts by default (#3987)Amber Brown2018-10-021-1/+2
| |
| * Fix userconsent on Python 3 (#3938)Amber Brown2018-10-021-48/+57
| |
* | move logic into register, fix room alias localpart bug, testsNeil Johnson2018-10-041-0/+1
|/
* Fix client IPs being broken on Python 3 (#3908)Amber Brown2018-09-201-2/+25
|
* Port tests/ to Python 3 (#3808)Amber Brown2018-09-071-15/+19
|
* Merge pull request #3800 from matrix-org/neilj/remove-guests-from-mau-count hhs-6Neil Johnson2018-09-061-0/+1
|\ | | | | guest users should not be part of mau total
| * ensure guests never enter mau listNeil Johnson2018-09-061-0/+1
| |
* | Merge branch 'master' into developRichard van der Hoff2018-09-061-3/+9
|\ \ | |/ |/|
| * Fix origin handling for pushed transactionsRichard van der Hoff2018-09-051-3/+9
| | | | | | | | | | Use the actual origin for push transactions, rather than whatever the remote server claimed.
* | Fix tests on postgresql (#3740)Amber Brown2018-09-041-4/+6
| |
* | move threepid checker to config, add missing yieldsNeil Johnson2018-08-311-0/+6
| |
* | Port storage/ to Python 3 (#3725)Amber Brown2018-08-311-0/+2
| |
* | Fix up testsRichard van der Hoff2018-08-281-2/+6
| |
* | Change admin_uri to admin_contact in config and errorsErik Johnston2018-08-241-1/+1
| |
* | Merge branch 'develop' of github.com:matrix-org/synapse into ↵Erik Johnston2018-08-201-61/+155
|\| | | | | | | erikj/refactor_state_handler
| * Integrate presence from hotfixes (#3694)Amber Brown2018-08-181-3/+4
| |
| * add new error type ResourceLimitNeil Johnson2018-08-161-0/+1
| |
| * replace admin_email with admin_uri for greater flexibilityNeil Johnson2018-08-151-1/+1
| |
| * support admin_email config and pass through into blocking errors, return ↵Neil Johnson2018-08-131-0/+1
| | | | | | | | AuthError in all cases
| * Revert "support admin_email config and pass through into blocking errors, ↵Neil Johnson2018-08-131-1/+0
| | | | | | | | | | | | return AuthError in all cases" This reverts commit 0d43f991a19840a224d3dac78d79f13d78212ee6.
| * support admin_email config and pass through into blocking errors, return ↵Neil Johnson2018-08-131-0/+1
| | | | | | | | AuthError in all cases
| * Run tests under PostgreSQL (#3423)Amber Brown2018-08-131-18/+115
| |
| * Run black.black2018-08-101-43/+35
| |
| * Merge pull request #3439 from vojeroen/send_sni_for_federation_requestsRichard van der Hoff2018-08-101-0/+2
| |\ | | | | | | send SNI for federation requests
| | * Merge branch 'develop' into send_sni_for_federation_requestsRichard van der Hoff2018-07-271-0/+3
| | |\
| | * \ Merge remote-tracking branch 'upstream/develop' into ↵Jeroen2018-07-141-1/+3
| | |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | send_sni_for_federation_requests # Conflicts: # synapse/crypto/context_factory.py
| | * | | send SNI for federation requestsJeroen2018-06-241-0/+2
| | | | |
* | | | | Fix testsErik Johnston2018-08-091-0/+30
|/ / / /
* | | | Merge pull request #3655 from matrix-org/neilj/disable_hsNeil Johnson2018-08-091-0/+2
|\ \ \ \ | | | | | | | | | | Flag to disable HS without disabling federation
| * \ \ \ Merge branch 'develop' into neilj/disable_hsNeil Johnson2018-08-081-0/+4
| |\ \ \ \
| * \ \ \ \ Merge branch 'develop' into neilj/disable_hsNeil Johnson2018-08-081-0/+2
| |\ \ \ \ \
| * | | | | | disable HS from configNeil Johnson2018-08-041-0/+2
| | | | | | |
* | | | | | | Test fixes for Python 3 (#3647)Amber Brown2018-08-091-4/+5
| |_|/ / / / |/| | | | |
* | | | | | Merge pull request #3654 from matrix-org/rav/room_versionsRichard van der Hoff2018-08-081-0/+4
|\ \ \ \ \ \ | |_|/ / / / |/| | | | | Support for room versioning
| * | | | | Basic support for room versioningRichard van der Hoff2018-08-031-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is the first tranche of support for room versioning. It includes: * setting the default room version in the config file * new room_version param on the createRoom API * storing the version of newly-created rooms in the m.room.create event * fishing the version of existing rooms out of the m.room.create event
* | | | | | mock config.max_mau_valueNeil Johnson2018-08-081-0/+1
| | | | | |
* | | | | | add default mau_limits_reserved_threepidsNeil Johnson2018-08-061-0/+1
| |/ / / / |/| | | |
* | | | | fix (lots of) py3 test failuresNeil Johnson2018-08-031-0/+1
|/ / / /
* | | / Python 3: Convert some unicode/bytes uses (#3569)Amber Brown2018-08-021-3/+6
| |_|/ |/| |
* | | Admin API for creating new users (#3415)Amber Brown2018-07-201-0/+3
| |/ |/|
* | Fix unit testsRichard van der Hoff2018-07-131-0/+1
| |
* | run isortAmber Brown2018-07-091-1/+2
|/
* Pass around the reactor explicitly (#3385)Amber Brown2018-06-221-1/+6
|
* Reject attempts to send event before privacy consent is givenRichard van der Hoff2018-05-221-0/+1
| | | | | | Returns an M_CONSENT_NOT_GIVEN error (cf https://github.com/matrix-org/matrix-doc/issues/1252) if consent is not yet given.
* Move consent config parsing into ConsentConfigRichard van der Hoff2018-05-221-1/+1
| | | | turns out we need to reuse this, so it's better in the config class.
* Send users a server notice about consentRichard van der Hoff2018-05-221-0/+1
| | | | | When a user first syncs, we will send them a server notice asking them to consent to the privacy policy if they have not already done so.
* Merge pull request #3108 from NotAFile/py3-six-urlparseRichard van der Hoff2018-04-301-3/+2
|\ | | | | Use six.moves.urlparse
| * Use six.moves.urlparseAdrian Tschira2018-04-151-3/+2
| | | | | | | | | | | | The imports were shuffled around a bunch in py3 Signed-off-by: Adrian Tschira <nota@notafile.com>
* | Add some more variables to the unittest configAdrian Tschira2018-04-151-0/+4
|/ | | | | | | These worked accidentally before (python2 doesn't complain if you compare incompatible types) but under py3 this blows up spectacularly Signed-off-by: Adrian Tschira <nota@notafile.com>
* Add b prefixes to some strings that are bytes in py3Adrian Tschira2018-04-041-1/+1
| | | | | | This has no effect on python2 Signed-off-by: Adrian Tschira <nota@notafile.com>
* Add tests for user directory searchRichard van der Hoff2018-01-271-0/+1
|
* Make it possible to run tests against postgresRichard van der Hoff2018-01-271-9/+34
|
* Create dbpool as normal in testsRichard van der Hoff2018-01-271-43/+17
| | | | | | | | ... instead of creating our own special SQLiteMemoryDbPool, whose purpose was a bit of a mystery. For some reason this makes one of the tests run slightly slower, so bump the sleep(). Sorry.
* Run on_new_connection for unit testsRichard van der Hoff2018-01-271-7/+17
| | | | | Configure the connectionpool used for unit tests to run the `on_new_connection` function.
* Remove unused/bitrotted MemoryDataStoreRichard van der Hoff2018-01-261-151/+13
| | | | This isn't used, and looks thoroughly bitrotted.
* Add federation_domain_whitelist option (#2820)Matthew Hodgson2018-01-221-0/+1
| | | | | | Add federation_domain_whitelist gives a way to restrict which domains your HS is allowed to federate with. useful mainly for gracefully preventing a private but internet-connected HS from trying to federate to the wider public Matrix network
* Disable user_directory updates for UTsRichard van der Hoff2018-01-091-0/+4
| | | | | Fix flakiness in the UTs caused by the user_directory being updated in the background
* fix testsRichard van der Hoff2017-10-311-0/+1
|
* replace 'except:' with 'except Exception:'Richard van der Hoff2017-10-231-4/+4
| | | | what could possibly go wrong
* Add a config option to block all room invites (#2457)Richard van der Hoff2017-09-191-0/+1
| | | | | - allows sysadmins the ability to lock down their servers so that people can't send their users room invites.
* Only load jinja2 templates onceErik Johnston2017-05-221-0/+1
| | | | | Instead of every time a new email pusher is created, as loading jinja2 templates is slow.
* Fix unit testsErik Johnston2016-12-091-0/+4
|
* Fix testsErik Johnston2016-11-231-0/+1
|
* Fix tests and flake8Erik Johnston2016-11-221-0/+1
|
* Fix testsErik Johnston2016-11-211-0/+2
|
* Merge pull request #1098 from matrix-org/markjh/bearer_tokenMark Haines2016-10-251-4/+14
|\ | | | | Allow clients to supply access_tokens as headers
| * Fix unit testsMark Haines2016-09-121-4/+14
| |
* | Merge pull request #1164 from pik/error-codesErik Johnston2016-10-191-1/+1
|\ \ | | | | | | Clarify Error codes for GET /filter/
| * | Fix MockHttpRequest always returning M_UNKNOWN errcode in testingpik2016-10-141-1/+1
| | |
* | | Implement pluggable password authErik Johnston2016-10-031-0/+1
|/ / | | | | | | | | | | Allows delegating the password auth to an external module. This also moves the LDAP auth to using this system, allowing it to be removed from the synapse tree entirely in the future.
* / Time out typing over federationErik Johnston2016-09-231-1/+8
|/
* Add `create_requester` functionRichard van der Hoff2016-07-261-5/+0
| | | | | Wrap the `Requester` constructor with a function which provides sensible defaults, and use it throughout
* Rework ldap integration with ldap3Martin Weinelt2016-06-221-0/+1
| | | | | | | | | | | | | | | | | | | Use the pure-python ldap3 library, which eliminates the need for a system dependency. Offer both a `search` and `simple_bind` mode, for more sophisticated ldap scenarios. - `search` tries to find a matching DN within the `user_base` while employing the `user_filter`, then tries the bind when a single matching DN was found. - `simple_bind` tries the bind against a specific DN by combining the localpart and `user_base` Offer support for STARTTLS on a plain connection. The configuration was changed to reflect these new possibilities. Signed-off-by: Martin Weinelt <hexa@darmstadt.ccc.de>
* Enable use_frozen_events in testsErik Johnston2016-06-171-0/+1
|
* Split out the auth handlerDavid Baker2016-06-021-10/+5
|
* Inject fake room list handler in testsDavid Baker2016-06-011-0/+2
| | | | Otherwise it tries to start the remote public room list updating looping call which breaks.
* Replaces calls to fetch_room_distributions_into with get_joined_hosts_for_roomMark Haines2016-05-161-1/+1
|
* Create user with expiryNegi Fazeli2016-05-131-0/+1
| | | | | | - Add unittests for client, api and handler Signed-off-by: Negar Fazeli <negar.fazeli@ericsson.com>
* Don't require config to create databaseErik Johnston2016-04-061-3/+3
|
* tests/utils: added room_invite_state_types to test configPatrik Oldsberg2016-03-041-0/+1
| | | | Signed-off-by: Patrik Oldsberg <patrik.oldsberg@ericsson.com>
* Pass whole requester to ratelimitingDaniel Wagner-Hall2016-03-031-0/+5
| | | | This will enable more detailed decisions
* Merge pull request #571 from matrix-org/daniel/asidsDaniel Wagner-Hall2016-03-031-6/+14
|\ | | | | Mark AS users with their AS's ID
| * Mark AS users with their AS's IDDaniel Wagner-Hall2016-02-111-6/+14
| |
* | Add a /replication API for extracting the updates that happened onMark Haines2016-03-011-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | synapse This is necessary for replicating the data in synapse to be visible to a separate service because presence and typing notifications aren't stored in a database so won't be visible to another process. This API can be used to either get the raw data by requesting the tables themselves or to just receive notifications for updates by following the streams meta-stream. Returns updates for each table requested a JSON array of arrays with a row for each row in the table. Each table is prefixed by a header row with the: name of the table, current stream_id position for the table, number of rows, number of columns and the names of the columns. This is followed by the rows that have been added to the server since the requester last asked. The API has a timeout and is hooked up to the notifier so that a slave can long poll for updates.
* | Fix flake8 warnings for testsMark Haines2016-02-191-17/+13
| |
* | Initial cutErik Johnston2016-02-171-2/+2
|/
* Rename config field to reflect yaml nameDaniel Wagner-Hall2016-02-031-1/+1
|
* Fix the mock homserver used in the testsMark Haines2016-01-291-0/+1
|
* Fix testsErik Johnston2016-01-271-0/+8
|
* Remove redundated BaseHomeServerErik Johnston2016-01-261-0/+18
|
* copyrightsMatthew Hodgson2016-01-071-1/+1
|
* Host /unstable and /r0 versions of r0 APIsDaniel Wagner-Hall2015-12-011-2/+3
|
* Test for background updatesMark Haines2015-11-101-0/+3
|
* Remove more unused parametersDaniel Wagner-Hall2015-11-021-1/+1
|
* rename schema_prepare to prepare_databaseErik Johnston2015-10-131-1/+1
|
* Expose error more nicelyErik Johnston2015-10-131-1/+1
|
* Swap out bcrypt for md5 in testsDaniel Wagner-Hall2015-08-261-0/+13
| | | | This reduces our ~8 second sequential test time down to ~7 seconds
* Stop looking up "admin", which we never readDaniel Wagner-Hall2015-08-251-1/+0
|
* Remove completely unused concepts from codebaseDaniel Wagner-Hall2015-08-251-2/+1
| | | | | | | | | | 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-1/+1
| | | | We're about to have two kinds of token, access and refresh
* Issue macaroons as opaque auth tokensDaniel Wagner-Hall2015-08-181-0/+2
| | | | | | | | | | | | | This just replaces random bytes with macaroons. The macaroons are not inspected by the client or server. In particular, they claim to have an expiry time, but nothing verifies that they have not expired. Follow-up commits will actually enforce the expiration, and allow for token refresh. See https://bit.ly/matrix-auth for more information
* Fix testsErik Johnston2015-06-121-0/+2
|
* Discard unused NotifierUserStreamsMark Haines2015-05-131-0/+3
|
* Don't bother checking for updates if the stream token hasn't advanced for a userMark Haines2015-05-131-1/+1
|
* Make work in both Maria and SQLite. Fix testsErik Johnston2015-04-011-1/+10
|
* Update testsErik Johnston2015-02-191-0/+1
|
* Use git aware version string in User-Agent and Server headersErik Johnston2015-02-181-2/+8
|
* Add a cache for get_eventMark Haines2015-02-111-0/+1
|
* Factor out some of the common homeserver setup code into aMark Haines2015-02-111-0/+23
| | | | setup_test_homeserver function in utils.
* Have MockClock detect attempts to cancel expired timers, to prevent a repeat ↵Paul "LeoNerd" Evans2015-01-131-4/+16
| | | | of SYN-230
* Kill off synapse.api.events.*Erik Johnston2014-12-161-6/+2
|
* Fix tests and remove debug loggingErik Johnston2014-12-121-2/+7
|
* Implement .cancel_call_later() in MockClockPaul "LeoNerd" Evans2014-12-101-2/+5
|
* Implement .call_later() in MockClockPaul "LeoNerd" Evans2014-12-101-0/+26
|
* Sign outgoing PDUs.Mark Haines2014-10-161-1/+2
|
* Raise a SynapseError if the authorisation header is missing or malformedMark Haines2014-10-131-0/+4
|
* Verify signatures for server2server requestsMark Haines2014-10-131-0/+3
|
* Merge branch 'develop' into server2server_signingMark Haines2014-09-301-2/+9
|\ | | | | | | | | | | Conflicts: synapse/storage/__init__.py tests/rest/test_presence.py
| * Unbreak tests after changing storage APIErik Johnston2014-09-291-2/+6
| |
| * Track the IP users connect with. Add an admin column to users table.Erik Johnston2014-09-261-0/+3
| |
| * Fix test.Erik Johnston2014-09-241-1/+1
| |
* | Sign federation transactionsMark Haines2014-09-241-0/+15
|/
* Move SQLiteMemoryDbPool implementation into tests.utilsPaul "LeoNerd" Evans2014-09-101-0/+14
|
* fix the copyright holder from matrix.org to OpenMarket Ltd, as matrix.org ↵Matthew Hodgson2014-09-031-1/+1
| | | | hasn't been incorporated in time for launch.
* Fix room permissions testErik Johnston2014-09-021-0/+3
|
* Fix the tests to include new db callsErik Johnston2014-09-011-0/+14
|
* Have MemoryDataStore's get_rooms_for_user_where_membership_is() return room ↵Paul "LeoNerd" Evans2014-09-011-2/+3
| | | | membership event objects, as per interface contract
* Fix a couple of bugs in presence handler related to pushing updatesto the ↵Erik Johnston2014-08-291-6/+31
| | | | correct user. Fix presence tests.
* Ability to assert a DeferredMockCallable has received no callsPaul "LeoNerd" Evans2014-08-281-0/+15
|
* Remove get_state_for_room function from federation handlerMark Haines2014-08-281-0/+10
|
* Fill out prev_events before calling persist_eventMark Haines2014-08-271-1/+3
|
* Merge branch 'develop' into storage_transactionsMark Haines2014-08-261-3/+5
|\ | | | | | | | | | | | | Conflicts: synapse/api/auth.py synapse/handlers/room.py synapse/storage/__init__.py
| * Fix ALL THE UNIT TESTSKegan Dougal2014-08-261-3/+5
| |
* | Take a snapshot of the state of the room before performing updatesMark Haines2014-08-221-0/+7
|/
* Merge branch 'master' of github.com:matrix-org/synapse into sql_refactorErik Johnston2014-08-191-1/+42
|\ | | | | | | | | | | | | Conflicts: tests/rest/test_presence.py tests/rest/test_rooms.py tests/utils.py
| * Add a DeferredMockCallable; like mock's MockCallable but allows awaitingPaul "LeoNerd" Evans2014-08-191-0/+41
| | | | | | | | on method calls to be made later
| * Rename MockHttpServer to MockHttpResource as it stands for one server ↵Paul "LeoNerd" Evans2014-08-191-1/+2
| | | | | | | | resource rather than an entire server
* | Change the MemoryDataStore to implement new storage apiErik Johnston2014-08-181-99/+50
| |
* | Fix some of the tests to reflect changes in the storage layer.Erik Johnston2014-08-151-22/+2
|/
* Allow advancing the MockClock's timePaul "LeoNerd" Evans2014-08-131-0/+4
|
* Move MockClock into tests.utils so we can reüse itPaul "LeoNerd" Evans2014-08-131-0/+10
|
* add in copyrights to everything, not just the synapse subdir, and add a ↵Matthew Hodgson2014-08-131-0/+15
| | | | copyrighter.pl whilst we're at it
* Reference Matrix Home Servermatrix.org2014-08-121-0/+252