Commit Graph

71 Commits

Author SHA1 Message Date
Stephan Erb cec93b6135 Push method to check if a specific ClientCaps supports a feature down to the caps module.
Public interfaces stay the same.
2009-11-09 21:26:56 +01:00
Stephan Erb a87693c735 Remove auto-generated smoketests 2009-11-05 20:54:32 +01:00
Stephan Erb 0abb1dfd20 Extract class: MetacontactManager from Contacts
For easy migration, interface is still preserved.
2009-11-05 19:43:25 +01:00
Stephan Erb 7829e7d40c Removed unused module 'meta.py' 2009-11-05 17:05:13 +01:00
Stephan Erb dec25246df Missing bits of the last commit (add account parameter to contact constructor) 2009-11-05 16:22:21 +01:00
Stephan Erb 06129f45ef Let contact instances know their corresponding account.
contact.account and gc_contact.account contains the account name of the owning account. There is still code around in many placed which tries to workaround this missing information. Such code has to be migrated on per-need basis.
2009-11-05 15:57:43 +01:00
Stephan Erb 2e5bf4d0d2 Organize tests into unit and integration tests.
Integration tests can depend on UI, network or both. Unittests use neither.
2009-11-05 09:06:46 +01:00
Stephan Erb 3a98a4170c Move Interface() god class from gajim.py to gui_interface.py. 2009-11-03 22:14:19 +01:00
Stephan Erb 47700e67da Rename CacheItem.update to CacheItem.set_and_store as this seems more intense giving. 2009-10-31 09:14:55 +01:00
Stephan Erb 99e8487db9 Move compute_caps_hash from helpers to caps module. 2009-10-30 23:55:03 +01:00
Stephan Erb 47f875a4bc Move CapsCache global from gajim.capscache to caps.capscache. 2009-10-30 23:01:25 +01:00
Stephan Erb bd714f66fc Move common part of Contact and GC_Contact into a new CommonContact class.
The CommonClass helps to spot easily where GC_Contacts and Contacts differ. This is just the first step a potential refactoring in this area.
2009-10-28 23:37:40 +01:00
Stephan Erb 33fe53ff7d Swtich from old to new caps API.
Now we do:

contact.supports(feauture) instead of gajim.capscache.is_supported(contact, feature)
2009-10-27 22:41:39 +01:00
Stephan Erb c7ff97703f Redistribute responsibility: Let contact instances check if features are supported 2009-10-27 20:31:09 +01:00
Stephan Erb 3295b08b26 Two small caps enhancements.
* Rename EntityCapabilities to ClientCaps as this seems more intense giving.
 * Add ability to blacklist features where we cannot savely assume that a client, which did not advertise caps, supports them
2009-10-26 19:20:16 +01:00
Stephan Erb 700665151c Implement 'supports' on contact instances.
Usage:

	if contact.supports(NS_E2E):
		....
2009-10-25 23:56:14 +01:00
Stephan Erb 396a2c603d Implement and test a supports_feature() method to directly test for supported featues on EntityCapabilites 2009-10-25 22:46:45 +01:00
Stephan Erb ca03f88fc3 Write tests and fix the caps preload alternative on the EntityCapabilities. 2009-10-25 22:32:18 +01:00
Stephan Erb 0440aec980 Improve common/caps.py test coverage. 2009-10-25 21:17:32 +01:00
Stephan Erb b97cd5bbf8 Remove unused imports. 2009-10-24 20:49:34 +02:00
Stephan Erb 2654ee9d56 Work around failing testcases.
It looks like those have not been run for month. A few are failing. They are now commented and wait for a proper fix. (Deferred)
2009-10-08 16:29:10 +02:00
Yann Leboulanger 752a6e72cb test_sessions require gtk 2009-04-08 07:30:40 +00:00
Yann Leboulanger b7c43f433b re-enable tests on commit time 2009-04-06 18:34:20 +00:00
Yann Leboulanger 4388e18c77 fix typo in resolver test 2009-04-06 18:33:30 +00:00
Yann Leboulanger fe8ca9b26a fix xmpp transport tests. Fixes #4829 2009-04-06 15:45:56 +00:00
Yann Leboulanger c5acd3f655 fix dispatcher tests. Fixes #4830 2009-04-06 13:36:29 +00:00
Yann Leboulanger d3ebaf5d8d fix test_xmpp_client_nb test unit 2009-04-06 13:18:56 +00:00
Yann Leboulanger 3d559033cb fix Mock class: child of object class and fix realClass usage 2009-04-06 13:07:12 +00:00
Yann Leboulanger a0d0a9b56c fix function name 2009-04-06 13:05:03 +00:00
Stephan Erb a757177e45 Improve code coverage of our testsuites and do some refactoring.
* resolver does not depend on GTK anymore
 * renamed a few modules for consistency
 * moved all mocks to lib/
 * let client_nb test work again. Was broken here

There are many failing tests, help appreciated :-)
2009-01-11 13:49:03 +00:00
Stephan Erb a1f346e48a Remove duplicated coded in test_client_nb.py 2008-12-24 14:53:00 +00:00
Stephan Erb 62a334b8fd Comment some prints in xmpp_mocks.py. Should be merged with test/lib/mocks.py 2008-12-24 14:50:50 +00:00
Stephan Erb 53d1fa6f66 Small cleanups to test_nonblockingtcp.py without much value. 2008-12-24 14:46:21 +00:00
Stephan Erb c5aff6f37c Make test_resolver work again after IdleQueue move. 2008-12-24 14:44:07 +00:00
Stephan Erb f1b831fd90 Temporary disable regression tests on commit. 2008-12-24 13:43:42 +00:00
Yann Leboulanger b317ffcdae merge BOSH branch to trunk 2008-12-15 21:06:08 +00:00
Yann Leboulanger 38eadfae5e [thorstenp] remove some useless space at eol 2008-12-03 22:44:02 +00:00
Yann Leboulanger 158538b81c [thorstenp] rename some var to not hide builts-in functions (list -> list_, ...) 2008-10-11 10:22:04 +00:00
Yann Leboulanger 196dd7e30a [thorstenp] use isinstance rather than type(x) == y. use sorted() 2008-10-11 09:59:52 +00:00
Yann Leboulanger 73aee40542 [thorstenp] replace none equality test with identity test 2008-10-11 09:44:12 +00:00
Yann Leboulanger 567f1e17c1 [thorstenp] di not use emtpy except clauses 2008-10-11 09:37:13 +00:00
Yann Leboulanger 9d7c80d522 [thorstenp] replace has_key by key in dict. Fixes #4392 2008-10-07 20:41:59 +00:00
Yann Leboulanger 3d46bf0b6e [dwd] fix reconnection when we get wrong XML with undeclared namespaces. Fixes #3083 2008-09-27 14:26:50 +00:00
tomk a7c36048b9 - renamed src/common/nslookup.py to resolver.py
- refactored resolver code and added asynchronous resolver based on patch by Damien Thebault[1]
  * Uses libasyncns-python[2]. If it's not available, old nslookup resolver is used)
  * works for SRV requests only at the moment

[1] https://www.lagaule.org/pipermail/gajim-devel/2008-July/000460.html
[2] https://code.launchpad.net/libasyncns-python
2008-08-31 23:40:06 +00:00
Stephan Erb a16c65873a Small enhancements for test_roster_window.
* Make sure that contacts show up under the correct parent
* Add check support for SelfContacts
2008-08-28 22:07:40 +00:00
Stephan Erb 9f52881d6e Fix option handling of the unittest runner. 2008-08-27 18:55:18 +00:00
Yann Leboulanger 5b6da9fbe0 fix dispatcher test. <x:y> in a message are not allowed 2008-08-27 07:56:02 +00:00
Yann Leboulanger 8a83033816 add some options to runtests.py to be able to tune verbosity and wether we want to run tests that require X or not 2008-08-27 07:55:06 +00:00
Yann Leboulanger ea99cb3682 coding standards 2008-08-27 07:51:05 +00:00
Yann Leboulanger 12f2c89070 coding standards 2008-08-27 07:49:41 +00:00