WEEE-Open / pytarallo

Python T.A.R.A.L.L.O. API
MIT License
2 stars 4 forks source link

Tarallo.remove_item() is not working properly #29

Closed steemnd closed 5 years ago

steemnd commented 5 years ago

For some obscure reason... i get F404 responses instead of 404, and this breaks tests... @lvps is that your fault? Could you please check if you experience the same issue?

lorcalhost commented 5 years ago

It seems to be working properly on my end, returns 404 for self.response.status_code

lvps commented 5 years ago

No Fs on my end, too. Status codes are treated as integers by all the involved libraries so I doubt that it's actually possible to send an actual "F404" code.

steemnd commented 5 years ago
test.test_invalid_login ... ok
test.test_logout_before_login ... ok
test.test_login_and_logout ... ok
test.test_get_invalid_item ... ok
test.test_get_item ... ok
test.test_retry_login ... ok
test.test_retry_login_without_previous_login ... ok
test.test_remove_item ... FAIL
test.test_remove_invalid_item ... FAIL

======================================================================
FAIL: test.test_remove_item
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/hyd3l/Workspace/python-tarallo/venv/lib/python3.7/site-packages/nose/case.py", line 198, in runTest
    self.test(*self.arg)
  File "/home/hyd3l/Workspace/python-tarallo/test.py", line 72, in test_remove_item
    assert tarallo_session.remove_item('1') is True
AssertionError: 
-------------------- >> begin captured logging << --------------------
urllib3.connectionpool: DEBUG: Starting new HTTP connection (1): 127.0.0.1:8080
urllib3.connectionpool: DEBUG: http://127.0.0.1:8080 "POST /v1/session HTTP/1.1" 204 0
urllib3.connectionpool: DEBUG: http://127.0.0.1:8080 "DELETE /v1/items/1 HTTP/1.1" 500 None
urllib3.connectionpool: DEBUG: http://127.0.0.1:8080 "GET /v1/items/1 HTTP/1.1" 200 None
--------------------- >> end captured logging << ---------------------

======================================================================
FAIL: test.test_remove_invalid_item
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/hyd3l/Workspace/python-tarallo/venv/lib/python3.7/site-packages/nose/case.py", line 198, in runTest
    self.test(*self.arg)
  File "/home/hyd3l/Workspace/python-tarallo/test.py", line 79, in test_remove_invalid_item
    assert tarallo_session.remove_item('asd') is False
AssertionError: 
-------------------- >> begin captured logging << --------------------
urllib3.connectionpool: DEBUG: Starting new HTTP connection (1): 127.0.0.1:8080
urllib3.connectionpool: DEBUG: http://127.0.0.1:8080 "POST /v1/session HTTP/1.1" 204 0
urllib3.connectionpool: DEBUG: http://127.0.0.1:8080 "DELETE /v1/items/asd HTTP/1.1" 204 0
urllib3.connectionpool: DEBUG: http://127.0.0.1:8080 "GET /v1/items/asd HTTP/1.1" 404 None
--------------------- >> end captured logging << ---------------------

----------------------------------------------------------------------
Ran 9 tests in 1.367s

FAILED (failures=2)

This is the output of my tests.