Commit graph libervia-backend/src/test
Author SHA1 Message Date
Goffi
95678d7967 core, plugin XEP-0115: discovery refactoring:
- hashing algorithm of XEP-0115 has been including in core
    - our own hash is still calculated by XEP-0115 and can be regenerated with XEP_0115.recalculateHash
    - old discovery methods have been removed. Now the following methods are used:
        - hasFeature: tell if a feature is available for an entity
        - getDiscoInfos: self explaining
        - getDiscoItems: self explaining
        - findServiceEntities: return all available items of an entity which given (category, type)
        - findFeaturesSet: search for a set of features in entity + entity's items
      all these methods are asynchronous, and manage cache automatically
    - XEP-0115 manage in a better way hashes, and now use a trigger for presence instead of monkey patch
    - new FeatureNotFound exception, when we want to do something which is not available
    - refactored client initialisation sequence, removed client.initialized Deferred
    - added constant APP_URL
    - test_plugin_xep_0033.py has been temporarly deactivated, the time to adapt it
    - lot of cleaning
2014-03-28 18:07:22 +01:00
Goffi
a6897c76e0 core, plugins: host.getClient now raise an exception instead of returning None when no profile is found, plugins have been adapted consequently and a bit cleaned 2014-03-28 18:07:02 +01:00
souliane
032c34cfdb test: fix tests fo plugins XEP-0033 and XEP-0085 2014-03-22 18:47:17 +01:00
Goffi
2a40da1664 tests: tests fixes 2014-03-21 16:19:46 +01:00
souliane
3249e50efe test: update radiocol test regarding the last changes 2014-03-15 01:19:22 +01:00
souliane
470e4f4edf test: skip radiocol tests if the sound samples are not found 2014-02-24 12:57:56 +01:00
souliane
7a9fb7f505 plugin XEP-0277: fix pubsub entry parsing using lxml instead of feed.atom 2014-02-23 13:54:41 +01:00
souliane
680dd48587 test: fix the tests for plugin room game 2014-02-20 17:51:51 +01:00
souliane
4bb50c59f7 test: skip the test for markdown syntax if the module is not installed 2014-02-20 16:37:05 +01:00
souliane
7c29b8c566 plugin room_game, radiocol: RoomGame.send returns a Deferred. 2014-02-18 17:49:33 +01:00
souliane
d5fb045f5b plugin text_syntaxes: html2text was breaking the long URLs 2014-02-13 12:29:14 +01:00
souliane
7ea4dca1b0 memory: bug fix to not register twice frontends parameters + added some tests for param update 2014-02-07 17:10:24 +01:00
souliane
ff81f76184 plugin groupblog, XEP-0071, XEP-0277, text_syntaxes: manage raw/rich/xhtml data for content/title:
Implementation should follow the following formal specification:

"title" and "content" data can be passed in raw, xhtml or rich format.
When we receive from a frontend a new/updated microblog item:

- keys "title" or "content" have to be escaped (disable HTML tags)
- keys "title_rich" or "content_rich" have to be converted from the current syntax to XHTML
- keys "title_xhtml" or "content_xhtml" have to be cleaned from unwanted XHTML content

Rules to deal with concurrent keys:

- existence of both  "*_xhtml" and "*_rich" keys must raise an exception
- existence of both raw and ("*_xhtml" or "*_rich") is OK

As the storage always need raw data, if it is not given by the user it can be
extracted from the "*_rich" or "*_xhtml" data (remove the XHTML tags).

When a frontend wants to edit a blog post that contains XHTML title or content,
the conversion is made from XHTML to the current user-defined syntax.

- plugin text_syntaxes: added "text" syntax (using lxml)
2014-02-05 16:36:51 +01:00
souliane
0698b69344 test radiocol: added a full scenario test 2014-01-15 23:24:22 +01:00
souliane
cf8f9330b4 test: improvements for the helpers classes:
- simplification for retrieving the sent messages
- an expected bridge call which is already set can no more be
  overwritten with new arguments for the same method name. The
  new arguments are stored in a FIFO list instead, and each call
  of the method also registers the arguments for the next call.
2014-01-15 23:22:07 +01:00
souliane
30dfdf1025 plugins room_games, radiocol, libervia: small changes like refactorization to ease the maintenance 2014-01-17 15:02:46 +01:00
Goffi
2ca6efd8cc dates update 2014-02-04 18:32:49 +01:00
souliane
41ce40b0e4 test: added tests for the plugin "room game" + rename other test files 2014-01-10 18:20:30 +01:00
souliane
ddcfdd99ac test: make FakeClient profile dependent and add some tools to test MUC 2014-01-10 18:15:02 +01:00
souliane
cd45ede2d2 test: silent info/warning that were polluting the output 2014-01-10 18:19:34 +01:00
souliane
db832c1f6b test: define the constants JIDs and profiles as lists 2014-01-09 11:18:33 +01:00
souliane
6be767ae3b test: use the SatTestCase methods instead of builtin "assert" in tests for memory, plugin xep-0033 2014-01-07 09:27:53 +01:00
souliane
84bfd205dd test: added tests for XEP-0033 2014-01-05 13:05:31 +01:00
souliane
96b1d58eb7 test: FakeMemory inherits from Memory + more helpers basic support + cleaning 2014-01-05 13:04:54 +01:00
souliane
9dc518a2a9 test: added tests for XEP-0085 2014-01-04 21:09:32 +01:00
souliane
6007937962 test: added some tests for Memory 2014-01-04 17:16:40 +01:00
souliane
8307896c4f test: added support of basic memory stuff in helpers.py 2014-01-04 15:46:30 +01:00
souliane
a21e3c2783 test: store the constants in constants.py + better PEP8 compliance 2014-01-04 15:45:08 +01:00
Goffi
5a00dc9503 core: i18n refactoring:
- _() is no more installed in __builtin__
    - instead, there is a new sat.core.i18n module
    - added D_() method for deferred translation
    - languageSwitch method allow to dynamically change translation language
    - import gettext is tested against ImportError, and dummy methods are used when not available (mainly useful for Libervia)
2013-12-29 17:06:01 +01:00
Goffi
5eee7729c3 test: better ignore_blank in helpers's assertEqualXML 2013-11-12 16:56:34 +01:00
Goffi
6b9e9b7a79 tests: plugin text syntaxes sanitisation tests 2013-11-12 14:16:11 +01:00
Goffi
96695b6d59 tests: added XML comparaison method to helpers 2013-11-12 14:16:11 +01:00
Goffi
8624c3c547 core, bridge: extra parameter is saved in history:
- added extra data in getHistory return value
    - extra data is saved in database
    /!\ WARNING: DATABASE SCHEMA HAS CHANGED /!\
to update sqlite database: ALTER TABLE history ADD COLUMN extra BLOB;
2013-11-07 15:29:39 +01:00
Goffi
1eee4a779c tests: helpers improvments:
- FakeParent renamed FakeClient
    - added FakeRoster class, and an instance of it in FakeClient (FakeClient.roster)
    - b2s function to convert boolean value to strings used in bridge
    - some fake methods (FakeClient.send, FakeSat.delContact) to avoid exceptions
2013-09-29 16:29:36 +02:00
Goffi
b370f284dd tests: fix SatMessageProtocolTest.test_onMessage 2013-09-26 17:33:04 +02:00
Goffi
0f22c904bc tests: Use of FailTest for DifferentArgsException instead of Exception, so the test fail instead of raising en error. 2013-09-26 17:32:24 +02:00
Goffi
1cd98e8dea fixed licences in docstrings (they are now in comments) 2013-03-08 00:36:22 +01:00
Emmanuel Gil Peyrot
5b54be83bd Fix pep8 support in src/test. 2013-01-18 17:55:35 +01:00
Emmanuel Gil Peyrot
27b3592e16 Remove trailing whitespaces. 2013-01-18 17:55:34 +01:00
Goffi
def79e44cd dates update 2013-01-07 23:30:13 +01:00
Goffi
fef2b1a620 core, bridge, quick_frontend: MUC private messages history management:
- history now store message type
    - sqlite3 storage: fixed resource management in getHistory
    - bridge: added message type in getHistory return value
    - quick_chats: (ugly) hacks to manage private history filtering/nickname printing
2012-10-17 00:35:48 +02:00
Goffi
8f622601c6 core: presence status + last resource refactored and kept in entitiesCache in memory.py, profile cache is purged on disconnection 2012-08-15 15:50:46 +02:00
Goffi
c5a930b627 Licence modification: the full project is now under AGPL v3+ instead of GPL v3+ 2012-08-01 22:53:02 +02:00
Goffi
21dbb4473a copyleft date update 2012-03-06 09:07:24 +01:00
Goffi
f1966d9692 backend, bridge: asynchronous history
quick_frontend: use of asynchronous history
2011-11-08 01:08:11 +01:00
Goffi
38f45e43d4 Tests
- first unit tests, finally \o/
- some helping methods/classes
- first tests for core.xmpp module
- update .hgignore to ignore test dir
- updated setup.py with new modules
2011-05-24 00:56:35 +02:00