Closed ElDeveloper closed 7 years ago
Most of the work is done here, however I have not been able to get the system up an running locally so I can only test through Travis. If someone could lend a hand (✋) by pulling this and testing it that would be awesome!
@ElDeveloper these are the errors that came up:
/Users/jose/.virtualenvs/labadmin/lib/python2.7/site-packages/requests/packages/urllib3/connection.py:303: SubjectAltNameWarning: Certificate for localhost has no `subjectAltName`, falling back to check for a `commonName` for now. This feature is being removed by major browsers and deprecated by RFC 2818. (See https://github.com/shazow/urllib3/issues/497 for details.)
SubjectAltNameWarning
EEEE
======================================================================
ERROR: test_get (__main__.TestPMShotgunPool)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/jose/.virtualenvs/labadmin/lib/python2.7/site-packages/tornado/testing.py", line 136, in __call__
result = self.orig_method(*args, **kwargs)
File "knimin/tests/test_pm_shotgun_pool_handlers.py", line 116, in test_get
response = self.get("/pm_shotgun_pool/?plate_id=%s" % nid)
File "/Users/jose/qiime_software/labadmin/knimin/tests/tornado_test_base.py", line 51, in get
return self.fetch(url, method='GET', headers=headers)
File "/Users/jose/.virtualenvs/labadmin/lib/python2.7/site-packages/tornado/testing.py", line 405, in fetch
self.http_client.fetch(self.get_url(path), self.stop, **kwargs)
AttributeError: 'TestPMShotgunPool' object has no attribute 'http_client'
======================================================================
ERROR: test_get_not_authed (__main__.TestPMShotgunPool)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/jose/.virtualenvs/labadmin/lib/python2.7/site-packages/tornado/testing.py", line 136, in __call__
result = self.orig_method(*args, **kwargs)
File "knimin/tests/test_pm_shotgun_pool_handlers.py", line 110, in test_get_not_authed
response = self.get('/pm_shotgun_pool/?plate_id=1')
File "/Users/jose/qiime_software/labadmin/knimin/tests/tornado_test_base.py", line 51, in get
return self.fetch(url, method='GET', headers=headers)
File "/Users/jose/.virtualenvs/labadmin/lib/python2.7/site-packages/tornado/testing.py", line 405, in fetch
self.http_client.fetch(self.get_url(path), self.stop, **kwargs)
AttributeError: 'TestPMShotgunPool' object has no attribute 'http_client'
======================================================================
ERROR: test_post (__main__.TestPMShotgunPool)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/jose/.virtualenvs/labadmin/lib/python2.7/site-packages/tornado/testing.py", line 136, in __call__
result = self.orig_method(*args, **kwargs)
File "knimin/tests/test_pm_shotgun_pool_handlers.py", line 138, in test_post
response = self.post('/pm_shotgun_pool/' % '&'.join(args), data=data)
TypeError: not all arguments converted during string formatting
======================================================================
ERROR: test_post_not_authed (__main__.TestPMShotgunPool)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/jose/.virtualenvs/labadmin/lib/python2.7/site-packages/tornado/testing.py", line 136, in __call__
result = self.orig_method(*args, **kwargs)
File "knimin/tests/test_pm_shotgun_pool_handlers.py", line 126, in test_post_not_authed
response = self.post('/pm_shotgun_pool/' % '&'.join(args), data=data)
TypeError: not all arguments converted during string formatting
----------------------------------------------------------------------
Ran 4 tests in 2.351s
FAILED (errors=4)
Thanks @josenavas, just pushed a few changes. Note that I haven't been able to fully test the post method, hence the self.fail()
.
Moving forward:
/Users/jose/.virtualenvs/labadmin/lib/python2.7/site-packages/requests/packages/urllib3/connection.py:303: SubjectAltNameWarning: Certificate for localhost has no `subjectAltName`, falling back to check for a `commonName` for now. This feature is being removed by major browsers and deprecated by RFC 2818. (See https://github.com/shazow/urllib3/issues/497 for details.)
SubjectAltNameWarning
..FWARNING:tornado.general:tornado.autoreload started more than once in the same process
WARNING:tornado.access:405 POST /pm_shotgun_pool/minimum-concentration=1&floor-concentration=1&total-quantity=10&plate-id=4&plate-name=Some%20Name&qpcr-machine=bob (127.0.0.1) 2.83ms
FWARNING:tornado.general:tornado.autoreload started more than once in the same process
WARNING:tornado.access:405 POST /pm_shotgun_pool/minimum-concentration=1&floor-concentration=1&total-quantity=10&plate-id=1&plate-name=Some%20Name&qpcr-machine=bob (127.0.0.1) 1.95ms
======================================================================
FAIL: test_post (__main__.TestPMShotgunPool)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/jose/.virtualenvs/labadmin/lib/python2.7/site-packages/tornado/testing.py", line 136, in __call__
result = self.orig_method(*args, **kwargs)
File "knimin/tests/test_pm_shotgun_pool_handlers.py", line 130, in test_post
self.assertEqual(response.code, 200)
AssertionError: 405 != 200
======================================================================
FAIL: test_post_not_authed (__main__.TestPMShotgunPool)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/jose/.virtualenvs/labadmin/lib/python2.7/site-packages/tornado/testing.py", line 136, in __call__
result = self.orig_method(*args, **kwargs)
File "knimin/tests/test_pm_shotgun_pool_handlers.py", line 117, in test_post_not_authed
self.assertEqual(response.code, 403)
AssertionError: 405 != 403
----------------------------------------------------------------------
Ran 4 tests in 2.383s
FAILED (failures=2)
Thanks, I'm not sure where the 405 is coming from, just added a print statement, to see what's going on, will check on it in the morning.
This should be ready for review, @wasade and I pair-programmed a part of this. As noted by @josenavas format_pooling_echo_pick_list
does not exist yet, so once that function exists, we can appropriately test the post method here.
Failures here are unrelated
Since there has been 2 devs pair-programming this + 1 reviewer I think this is reviewed enough
Thanks for the help @josenavas & @wasade!
Do not review yet, I want to run the tests and see what's working so far.