Commit graph libervia-backend/tests
Author SHA1 Message Date
Goffi
ba9a2fc6d5 tests (unit/XEP-0338): Fix async call to xep_0338._jingle_handler_trigger 2026-04-14 23:06:12 +02:00
Goffi
f5e0152b32 plugin XEP-0355: Namespace Delegation implementation:
The admin mode is implemented. It is needed to handle PEP with Pubsub Component.

rel 476
2026-04-14 23:04:04 +02:00
Goffi
c10c34304a tests (unit/email gateway): Fix tests 2026-04-11 12:46:47 +02:00
Goffi
31b55fbbe7 tests (unit/component pubsub): Fix tests
rel 476
2026-04-11 01:55:15 +02:00
Goffi
2c3d11e7ff tests (unit): Pubsub component tests:
rel 476
2026-04-09 21:47:53 +02:00
Goffi
09bef94ffe plugin XEP-0373, tests (unit/XEP-0373): Make rpad size >= 50:
XEP-0420 bounds starts at 0 but 0-length rpad defeats its purpose (the XEP actually says
"TODO: sane boundaries?"). Furthermore, some tests where failing randomly due to 0-lenght
rpad sometimes happening. This patch makes rpad minimum size at 50.
2026-04-09 21:47:53 +02:00
Goffi
73b410aa97 tests (unit/cli/calls): Skip tests in case of missing media or webrtc:
Test were raising exceptions when optional modules were missing (GStreamer related modules
for `webrtc`). Those are now catched so the tests are simply skipped in this case.

`MissingModule` is now inheriting from `ImportError`, as it's a natural subclass, and it
makes import error catching easier.
2026-04-09 21:47:46 +02:00
Goffi
72d7868eb5 tests (unit/conftests): Add a reset_storage autouse fixture:
Storage can be modified by tests, and it is kept for the whole session, this may have side
effect resulting in other tests failing. This fixture avoid this problem by reseting
`storage` between each test.
2026-04-09 21:47:43 +02:00
Goffi
0cfeea8203 tests (unit/conftest): bridge is now a read-only property, update _bridge instead. 2026-04-09 21:47:07 +02:00
Goffi
68da01a043 Dates update. 2026-03-31 12:57:17 +02:00
Goffi
51776603e0 depdencies, core: update Tx-XMPP to be version >= 10.0:
This version changes the package name, so all `wokkel` imports habe been replaced by
`tx_xmpp`
2026-03-24 16:42:27 +01:00
Goffi
82e2c6efac apply black to the whole codebase. 2026-03-09 09:22:04 +01:00
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