Commit graph libervia-backend/tests
Author SHA1 Message Date
Goffi
b4a13ce51e tests (unit): Add tests for pubsub contacts:
Tests the models and plugin data behaviour.

rel 475
2026-02-23 13:15:16 +01:00
Goffi
c5396f0acf backend: Tor integration:
- Add the `txtorcon` optional dependency, used with `tor` extra.
- Add settings for Tor.
- Use Tor endpoint when an `.onion` XMPP domain is used, of when Tor is explicitely
  enabled in conf.
- Disable WebRTC, for now it's the safer option as WebRTC can leak IP. It should be
  possible to use it over Tor by forcing the use of a .onion relay, but this is to be
  explored later (A/V should be to slow to be usable, but that stay relevant for file
  transfer or other WebRTC powered things).
- A new `treq` instance using Tor WebAgent is used when Tor is enabled. Properties has
  been added to SatXMPPEntity to conveniently get the right instance.
- Another `tor_mode` property has been added with corresponding bridge methods, to see if
  Tor is activated and in which mode for a given profile. For now there are only two modes
  (disabled, and enabled with WebRTC disabled), but in the future it may be possible to
  activate WebRTC over Tor, or to use Tor only to connect to XMPP server, while using
  clearnet for other connections.
- Tor dedicated models have been added, and bridge methods have been added to build and
  get them.
- Fix tests.

rel 473
2025-12-15 11:35:19 +01:00
Goffi
7b3c8d2ba8 black reformatting. 2025-12-03 17:49:34 +01:00
Goffi
e68278a1ac tests (unit): Fix tests. 2025-12-03 17:43:06 +01:00
Goffi
96bf3af324 Global reformatting with black. 2025-09-13 10:46:10 +02:00
Goffi
2b9b14ba1b tests (unit/components): Add tests for email gateway's cleaning module:
rel 464
2025-09-11 21:17:51 +02:00
Goffi
14f50afa64 tests (unit/sqla): Add test for keyword filtering:
rel 458
2025-06-06 10:45:54 +02:00
Goffi
4a0d106b90 test (XEP-0461): some tests for XEP-0461:
rel 457
2025-05-06 00:34:01 +02:00
Goffi
b7f4202a78 tests (unit/email gateway): add tests for pubsub service:
rel 453
2024-12-03 00:52:06 +01:00
Goffi
91447d0c88 tests (unit): fix tests:
- test_ap-gateway: fix missing implementation of `client.is_local`
- test_plugin_xep_0215: fix missing return value of `has_feature`
2024-09-30 14:15:47 +02:00
Goffi
03e1357401 tests (unit/email gateway): add test for XEP-0131 handling:
rel 451
2024-09-28 15:59:48 +02:00
Goffi
5226323cae tests (unit): add XEP-0131 tests:
rel 451
2024-09-28 15:57:03 +02:00
Goffi
a81612f0f1 test (unit): add test for email gateway:
rel 450
2024-09-26 16:12:01 +02:00
Goffi
49a1cfe974 test (unit): add test for plugin XEP-0033:
those replace the legacy XEP-0033 test from libervia/backend/test/test_plugin_xep_0033.py.

rel 450
2024-09-26 16:12:01 +02:00
Goffi
5005ca346b tests: reformat tests using black. 2024-09-26 16:11:56 +02:00
Goffi
4f7f383687 tests (unit): add test for XEP-0298 plugin + fix XEP-0167:
fix 447
2024-07-29 03:49:26 +02:00
Goffi
067d8f32bf tests (unit): fix tests + black reformatting. 2024-07-14 17:42:53 +02:00
Goffi
b402be2a7a component AP Gateway: implement HTTP GET signature. 2024-06-05 22:34:09 +02:00
Goffi
b81a931867 tests (unit/XEP-0272): XEP-0272 tests:
fix 429
2024-05-15 17:35:16 +02:00
Goffi
f1cc67fd46 test (unit/cli): Add a file send/receive test for WebRTC:
fix 442
2024-04-06 15:21:00 +02:00
Goffi
27b66b3fb2 tests (unit/webrtc,XEP-0176, XEP-0234): Fix tests and add webrtc file transfer tests:
fix 441
2024-04-06 12:59:50 +02:00
Goffi
48201780de tests: fix and update tests:
- update code to newer version of `sh`
- update code to newer version of `selenium`
- update names of OMEMO algorithms
- fix paths and names used to mount source to the test container
- skip modules using `Gst` and `PyQt` when they are not available.
2024-03-05 17:31:56 +01:00
Goffi
039a9b5830 tests (unit): fix tests 2024-02-23 15:42:02 +01:00
Goffi
ce2d217c64 tests (unit/cli/calls): unit tests for CLI call GUI:
rel 427
2024-02-11 23:21:07 +01:00
Goffi
6a92ebce37 tests (unit/frontends): tests for webrtc implementation:
rel 426
2023-11-01 14:04:25 +01:00
Goffi
91f6b77b3d refactoring: rename core.sat_main to core.main 2023-06-02 12:59:21 +02:00
Goffi
af1c203450 refactoring: rename SAT class to LiberviaBackend 2023-06-02 11:55:48 +02:00
Goffi
d2685ba11b refactoring: renamed sat package to libervia.backend 2023-06-02 11:49:51 +02:00
Goffi
f92c1f2ac6 tests (unit): Skip XEP-0373 test if gpg can't be imported 2023-06-01 21:37:34 +02:00
Goffi
c92762858f tests (units): tests for plugin XEP-0339:
fix 439
2023-06-01 21:37:31 +02:00
Goffi
ce8623dc97 tests (units): tests for plugin XEP-0338:
fix 440
2023-05-30 22:23:37 +02:00
Goffi
e98d39990b tests (units): tests for plugin XEP-0294:
fix 438
2023-05-30 17:58:44 +02:00
Goffi
76c8015212 tests (units): tests for plugin XEP-0293:
fix 437
2023-05-29 17:58:05 +02:00
Goffi
52547edb15 tests (units): tests for plugin XEP-0167:
fix 420
2023-05-29 13:38:11 +02:00
Goffi
791544ec54 tests (unit): XEP-0320 tests:
fix 421
2023-05-15 17:02:41 +02:00
Goffi
bd675233cb tests (unit): tests for plugin XEP-0176:
fix 419
2023-05-15 16:23:50 +02:00
Goffi
6a6f15707a massive refactoring to switch from camelCase to snake_case:
historically, Libervia (SàT before) was using camelCase as allowed by PEP8 when using a
pre-PEP8 code, to use the same coding style as in Twisted.

However, snake_case is more readable and it's better to follow PEP8 best practices, so it
has been decided to move on full snake_case. Because Libervia has a huge codebase, this
ended with a ugly mix of camelCase and snake_case.

To fix that, this patch does a big refactoring by renaming every function and method
(including bridge) that are not coming from Twisted or Wokkel, to use fully snake_case.

This is a massive change, and may result in some bugs.
2023-04-08 13:54:42 +02:00
Goffi
378dfea0de tests (unit): Add test for plugin XEP-0215:
rel 418
2023-04-07 15:17:24 +02:00
Goffi
52f7a2b11f component AP gateway: don't percent-encode @:
Mastodon doesn't like when "@" is percent-encoded (because it doesn't do it, and it checks
that the URL matches the ID without taking care of percent-encoding).
2023-02-10 17:20:02 +01:00
Goffi
2940ba0d35 core (main): log Exception when bridge_pi fails 2022-11-24 12:25:04 +01:00
Goffi
4d14a623fc component AP gateway: parse body immediately on POST request:
the body is parsed immediately during a `POST` request: this avoids duplication of code,
and allows to check the body data before continuing (will be used to filter some requests
in a future patch).
2022-11-15 18:07:34 +01:00
Goffi
e735ae6a58 tests (e2e/cli): test for Pubsub Targeted Encryption:
rel 382
2022-10-31 13:48:31 +01:00
Goffi
27e9655898 tests (e2e/cli): add tests for JET:
rel 378
2022-10-31 04:09:38 +01:00
Goffi
8cf01c8569 tests (e2e/cli): add a test for Pubsub Signing:
rel 381
2022-10-30 01:06:55 +02:00
Goffi
2e46d08225 tests (e2e/cli): add test for pubsub encryption:
test encryption and keys sharing.

rel 380
2022-10-15 20:38:33 +02:00
Syndace
6d1e942f43 plugin XEP-0373 and XEP-0374: Implementation of OX and OXIM:
GPGME is used as the GPG provider.

rel 374
2022-09-20 16:22:18 +02:00
Syndace
75ae8160ae plugin XEP-0384: Fully reworked to adjust to the reworked python-omemo:
- support for both (modern) OMEMO under the `urn:xmpp:omemo:2` namespace and (legacy) OMEMO under the `eu.siacs.conversations.axolotl` namespace
- maintains one identity across both versions of OMEMO
- migrates data from the old plugin
- includes more features for protocol stability
- uses SCE for modern OMEMO
- fully type-checked, linted and format-checked
- added type hints to various pieces of backend code used by the plugin
- added stubs for some Twisted APIs used by the plugin under stubs/ (use `export MYPYPATH=stubs/` before running mypy)
- core (xmpp): enabled `send` trigger and made it an asyncPoint

fix 375
2022-08-23 21:06:24 +02:00
Goffi
c2e2f0c332 tests (unit/AP gateway): add tests for events:
rel 372
2022-09-22 00:01:48 +02:00
Goffi
a206196e9d tests (unit/AP gateway): fix tests:
rel 372
2022-09-22 00:01:48 +02:00
Goffi
4d2263f54b tests (AP gateway): reactions tests:
2 new tests check XMPP <=> AP reactions conversion

rel 371
2022-08-31 17:07:03 +02:00