{"action":"created","issue":{"url":"https://api.github.com/repos/SatelliteQE/robottelo/issues/2153","labels_url":"https://api.github.com/repos/SatelliteQE/robottelo/issues/2153/labels{/name}","comments_url":"https://api.github.com/repos/SatelliteQE/robottelo/issues/2153/comments","events_url":"https://api.github.com/repos/SatelliteQE/robottelo/issues/2153/events","html_url":"https://github.com/SatelliteQE/robottelo/issues/2153","id":72106380,"number":2153,"title":"Fix Forbidden error in test : tests.foreman.ui.test_user.User.[test_positive_update_user_1, test_update_password]","user":{"login":"jyejare","id":11752425,"avatar_url":"https://avatars.githubusercontent.com/u/11752425?v=3","gravatar_id":"","url":"https://api.github.com/users/jyejare","html_url":"https://github.com/jyejare","followers_url":"https://api.github.com/users/jyejare/followers","following_url":"https://api.github.com/users/jyejare/following{/other_user}","gists_url":"https://api.github.com/users/jyejare/gists{/gist_id}","starred_url":"https://api.github.com/users/jyejare/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jyejare/subscriptions","organizations_url":"https://api.github.com/users/jyejare/orgs","repos_url":"https://api.github.com/users/jyejare/repos","events_url":"https://api.github.com/users/jyejare/events{/privacy}","received_events_url":"https://api.github.com/users/jyejare/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/SatelliteQE/robottelo/labels/Bug","name":"Bug","color":"fc2929"},{"url":"https://api.github.com/repos/SatelliteQE/robottelo/labels/UI","name":"UI","color":"0052cc"}],"state":"open","locked":false,"assignee":{"login":"sghai","id":620852,"avatar_url":"https://avatars.githubusercontent.com/u/620852?v=3","gravatar_id":"","url":"https://api.github.com/users/sghai","html_url":"https://github.com/sghai","followers_url":"https://api.github.com/users/sghai/followers","following_url":"https://api.github.com/users/sghai/following{/other_user}","gists_url":"https://api.github.com/users/sghai/gists{/gist_id}","starred_url":"https://api.github.com/users/sghai/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sghai/subscriptions","organizations_url":"https://api.github.com/users/sghai/orgs","repos_url":"https://api.github.com/users/sghai/repos","events_url":"https://api.github.com/users/sghai/events{/privacy}","received_events_url":"https://api.github.com/users/sghai/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/SatelliteQE/robottelo/milestones/43","html_url":"https://github.com/SatelliteQE/robottelo/milestones/Week%20of%20May%204,%202015","labels_url":"https://api.github.com/repos/SatelliteQE/robottelo/milestones/43/labels","id":1054535,"number":43,"title":"Week of May 4, 2015","description":"","creator":{"login":"omaciel","id":53362,"avatar_url":"https://avatars.githubusercontent.com/u/53362?v=3","gravatar_id":"","url":"https://api.github.com/users/omaciel","html_url":"https://github.com/omaciel","followers_url":"https://api.github.com/users/omaciel/followers","following_url":"https://api.github.com/users/omaciel/following{/other_user}","gists_url":"https://api.github.com/users/omaciel/gists{/gist_id}","starred_url":"https://api.github.com/users/omaciel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/omaciel/subscriptions","organizations_url":"https://api.github.com/users/omaciel/orgs","repos_url":"https://api.github.com/users/omaciel/repos","events_url":"https://api.github.com/users/omaciel/events{/privacy}","received_events_url":"https://api.github.com/users/omaciel/received_events","type":"User","site_admin":false},"open_issues":14,"closed_issues":11,"state":"open","created_at":"2015-04-06T14:27:00Z","updated_at":"2015-05-05T10:30:20Z","due_on":"2015-05-10T03:00:00Z","closed_at":null},"comments":4,"created_at":"2015-04-30T09:12:03Z","updated_at":"2015-05-05T10:38:29Z","closed_at":null,"body":"The issue is due to no role assigned to the user while creating it.\r\n\r\nStacktrace:\r\n\r\n```\r\nStacktrace\r\n\r\n  File \"/usr/lib64/python2.7/unittest/case.py\", line 369, in run\r\n    testMethod()\r\n  File \"/home/jenkins/shiningpanda/jobs/abb3bf3f/virtualenvs/d41d8cd9/lib/python2.7/site-packages/ddt.py\", line 146, in wrapper\r\n    return func(self, *args, **kwargs)\r\n  File \"robottelo/common/decorators.py\", line 362, in wrapper_func\r\n    return func(*args, **kwargs)\r\n  File \"/home/jenkins/workspace/satellite6-automation-downstream-rhel66-ui/tests/foreman/ui/test_user.py\", line 837, in test_positive_update_user_1\r\n    self.assertTrue(self.login.is_logged())\r\n  File \"robottelo/ui/login.py\", line 56, in is_logged\r\n    response.raise_for_status()\r\n  File \"/home/jenkins/shiningpanda/jobs/abb3bf3f/virtualenvs/d41d8cd9/lib/python2.7/site-packages/requests/models.py\", line 851, in raise_for_status\r\n    raise HTTPError(http_error_msg, response=self)\r\n'403 Client Error: Forbidden\\n--------------------\r\n```"},"comment":{"url":"https://api.github.com/repos/SatelliteQE/robottelo/issues/comments/99029207","html_url":"https://github.com/SatelliteQE/robottelo/issues/2153#issuecomment-99029207","issue_url":"https://api.github.com/repos/SatelliteQE/robottelo/issues/2153","id":99029207,"user":{"login":"rplevka","id":11773362,"avatar_url":"https://avatars.githubusercontent.com/u/11773362?v=3","gravatar_id":"","url":"https://api.github.com/users/rplevka","html_url":"https://github.com/rplevka","followers_url":"https://api.github.com/users/rplevka/followers","following_url":"https://api.github.com/users/rplevka/following{/other_user}","gists_url":"https://api.github.com/users/rplevka/gists{/gist_id}","starred_url":"https://api.github.com/users/rplevka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rplevka/subscriptions","organizations_url":"https://api.github.com/users/rplevka/orgs","repos_url":"https://api.github.com/users/rplevka/repos","events_url":"https://api.github.com/users/rplevka/events{/privacy}","received_events_url":"https://api.github.com/users/rplevka/received_events","type":"User","site_admin":false},"created_at":"2015-05-05T10:38:29Z","updated_at":"2015-05-05T10:38:29Z","body":"I am the guilty one - \r\nI've refactored `is_logged` in a way that any HTTP response other than 200 or 302 will raise the exception.\r\nI'm noticing that visiting the /dashboard page as a regular user (with no special permissions) will result in 403 but it means, the user's session is still valid.\r\nIn case we let the session expire or we simply log out the user, accessing /dashboard will result in 302 (redirection)\r\n\r\nSo I guess I should handle 403 code same way as 200.\r\nBut this could backfire in case, something is wrong with the HTTP server. - If such is the case and the server won't let us in to the app (by returning 403), the `is_logged` will treat that as success.\r\n\r\nany suggestions?"}}