#314 Cleanup the testing environment
Merged by abompard. Opened by abompard.
abompard/fedora-hubs cleanup-test-env  into  develop

Download 314.patch

Remove unused and duplicated code, and fix the Tox configuration.

rebased

The code changes look good, but I'm seeing one test failure that doesn't occur on develop

======================================================================
FAIL: test_data_simple (hubs.tests.test_widgets.test_library.TestLibrary)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/vagrant/devel/hubs/tests/test_widgets/test_library.py", line 36, in test_data_simple
    self.assertDictEqual(data['data'], expected_dict['data'])
AssertionError: {'sou[46 chars]alph/60', 'urls': ['<a href="ralph/">ralph/</a[29 chars]dit'} != {'sou[46 chars]alph/57', 'urls': ['<a href="ralph/">ralph/</a[29 chars]dit'}
- {'edit_url': '/ralph/60/edit',
?                      ^^
+ {'edit_url': '/ralph/57/edit',
?                      ^^
   'source_url': '/source/library',
   'urls': ['<a href="ralph/">ralph/</a>'],
-  'widget_url': '/ralph/60'}
?                        ^^
+  'widget_url': '/ralph/57'}
?                        ^^
-------------------- >> begin captured logging << --------------------
vcr.cassette: DEBUG: Entering context for cassette at /home/vagrant/devel/hubs/tests/vcr-request-data/hubs.tests.test_widgets.test_library.TestLibrary.test_data_simple.
flask_oidc: DEBUG: Missing or invalid ID token cookie
Traceback (most recent call last):
  File "/home/vagrant/devel/.tox/py35/lib/python3.5/site-packages/flask_oidc/__init__.py", line 250, in _get_cookie_id_token
    'OIDC_ID_TOKEN_COOKIE_NAME']]
KeyError: 'oidc_id_token'
dogpile.lock: DEBUG: NeedRegenerationException
dogpile.lock: DEBUG: no value, waiting for create lock
dogpile.lock: DEBUG: value creation lock <dogpile.cache.backends.null.NullLock object at 0x7fbe05753cf8> acquired
dogpile.lock: DEBUG: Calling creation function
dogpile.lock: DEBUG: Released creation lock
vcr.cassette: DEBUG: Exiting context for cassette at /home/vagrant/devel/hubs/tests/vcr-request-data/hubs.tests.test_widgets.test_library.TestLibrary.test_data_simple.
--------------------- >> end captured logging << ---------------------

I think removing that duplicate code shifted database ids a bit and caused this. That's just a guess, though.

Absolutely, I fixed it.

1 new commit added

  • Fix a index change

rebased

Great, merge whenever you're ready!

Pull-Request has been merged by abompard

Metadata