General
Production deployment to Pypi due to [test.pypi](https://test.pypi.org/legacy/) being down.
Hackathon release version `v1.1.0`.
New Use Cases
- `it_cache_busting.py`: Include cache busting test cases. Dependencies: `pytest` , `flaky`.
- here_now multiple channels
it_cache_busting
Flaky for retrying of tests.
here_now multiple channels
Updated `-here` to work with multiple channels:
Subscribe to multiple channels using presence and call `- here` on them:
pubnub-python-tools -here "test.channel,test.channel.2"
result: HereNow Result total occupancy: 4, total channels: 2
{'here_now_channels': ['test.channel', 'test.channel.2'], 'here_now_occupancy': [3, 1], 'here_now_uuids': ['UUID1'], 'here_now_states': [None]}
Maintenance
- CLI unsubscribes - More reliable.
- Herenow - Bug fixes. Cache busting tests.
- Coverage - Updated coverage.
- Scripts - `build_install.sh` using dynamic version from `__about__.py`.
Bug Fixing
Multiple channel `HereNow` Fix
There was an odd error with here_now when calling multiple channels on both the `sync` and `async` implementations. The root cause was that the custom `here_now` callback had a field that was generated once the callback's done, but because the tests were calling the same callback instance, some were already trying to evaluate the callback's result when there was none yet.
The solution was to remove the PubNub instances from within the test function creation to the module level so all the tests within that file use the same server. That gives more control on the sequence of events that can be called from within the test. Also had to add a try/except of the `sync` implementation.
Even though this is a valid solution, this is taking advantage of the package `flaky` that allows you to retry the test case a number of times and other shannanigans. I think this is a modern way to test this kind's of systems, but not as sharp as using unittests, which the cache busting scenario still doesn't have.
**Full Changelog**: https://github.com/sergio-munoz/pubnub-python-tools/compare/v1.0.0.1...v1.1.0
v.1.1.0-b
General
Production deployment to Pypi due to [test.pypi](https://test.pypi.org/legacy/) being down.
Hackathon release version `v1.1.0`.
New Use Cases
- `it_cache_busting.py`: Include cache busting test cases. Dependencies: `pytest` , `flaky`.
- here_now multiple channels
it_cache_busting
Flaky for retrying of tests.
here_now multiple channels
Updated `-here` to work with multiple channels:
Subscribe to multiple channels using presence and call `- here` on them:
pubnub-python-tools -here "test.channel,test.channel.2"
result: HereNow Result total occupancy: 4, total channels: 2
{'here_now_channels': ['test.channel', 'test.channel.2'], 'here_now_occupancy': [3, 1], 'here_now_uuids': ['UUID1'], 'here_now_states': [None]}
Maintenance
- CLI unsubscribes - More reliable.
- Herenow - Bug fixes. Cache busting tests.
- Coverage - Updated coverage.
- Scripts - `build_install.sh` using dynamic version from `__about__.py`.
Bug Fixing
Multiple channel `HereNow` Fix
There was an odd error with here_now when calling multiple channels on both the `sync` and `async` implementations. The root cause was that the custom `here_now` callback had a field that was generated once the callback's done, but because the tests were calling the same callback instance, some were already trying to evaluate the callback's result when there was none yet.
The solution was to remove the PubNub instances from within the test function creation to the module level so all the tests within that file use the same server. That gives more control on the sequence of events that can be called from within the test. Also had to add a try/except of the `sync` implementation.
Even though this is a valid solution, this is taking advantage of the package `flaky` that allows you to retry the test case a number of times and other shannanigans. I think this is a modern way to test this kind's of systems, but not as sharp as using unittests, which the cache busting scenario still doesn't have.
**Full Changelog**: https://github.com/sergio-munoz/pubnub-python-tools/compare/v1.0.0.1...v1.1.0