Code review comment for lp:~mvo/software-center/recagent-test-cleanup

Revision history for this message
Michael Vogt (mvo) wrote :

On Wed, Aug 29, 2012 at 02:07:19AM -0000, Gary Lasker wrote:
> Hi Michael, this all seems good and the cleanup is great. I assume all of these tests are working for you now, but I am consistently getting 401 errors for three of the tests (see below). It's late though, we can look at this tomorrow.

Thanks, I guess we need to add skip decorators again for those, it
seems to be dependant on the account of maybe on the time the tests
are run :) I wonder if instead we should build a mock service but I
guess that is a bit too much work :/

> $ PYTHONPATH=. python tests/test_recagent.py
> .No handlers could be found for logger "softwarecenter.backend.spawn_helper"
> F.F..F..s
> ======================================================================
> FAIL: test_recagent_post_submit_profile (__main__.TestRecommenderAgent)
> ----------------------------------------------------------------------
> Traceback (most recent call last):
> File "tests/test_recagent.py", line 81, in test_recagent_post_submit_profile
> self.assertServerReturnsWithNoError()
> File "tests/test_recagent.py", line 68, in assertServerReturnsWithNoError
> self.assertFalse(self.error, "got error: '%s'" % self.error_msg)
> AssertionError: got error: 'WARNING:__main__:401: {'status': '401', 'content-length': '22', 'via': '1.1 myrica.canonical.com:3128 (squid/2.7.STABLE7)', 'x-cache': 'MISS from myrica.canonical.com', 'x-cache-lookup': 'MISS from myrica.canonical.com:3128', 'expires': 'Wed, 29 Aug 2012 02:04:18 GMT', 'vary': 'Authorization,Accept-Encoding', '-content-encoding': 'gzip', 'server': 'Apache/2.2.22 (Ubuntu)', 'last-modified': 'Wed, 29 Aug 2012 02:04:18 GMT', 'etag': '"7e287fc885d9fdcf42da3a12f38572c1"', 'strict-transport-security': 'max-age=2592000', 'cache-control': 'max-age=0', 'date': 'Wed, 29 Aug 2012 02:04:18 GMT', 'content-type': 'text/html; charset=utf-8', 'www-authenticate': 'OAuth realm="SoftwareCenter Agent"'}
> '
>
> ======================================================================
> FAIL: test_recagent_query_profile (__main__.TestRecommenderAgent)
> ----------------------------------------------------------------------
> Traceback (most recent call last):
> File "tests/test_recagent.py", line 97, in test_recagent_query_profile
> self.assertServerReturnsWithNoError()
> File "tests/test_recagent.py", line 68, in assertServerReturnsWithNoError
> self.assertFalse(self.error, "got error: '%s'" % self.error_msg)
> AssertionError: got error: 'WARNING:__main__:401: {'status': '401', 'content-length': '22', 'via': '1.1 myrica.canonical.com:3128 (squid/2.7.STABLE7)', 'x-cache': 'MISS from myrica.canonical.com', 'x-cache-lookup': 'MISS from myrica.canonical.com:3128', 'expires': 'Wed, 29 Aug 2012 02:04:24 GMT', 'vary': 'Authorization,Accept-Encoding', '-content-encoding': 'gzip', 'server': 'Apache/2.2.22 (Ubuntu)', 'last-modified': 'Wed, 29 Aug 2012 02:04:24 GMT', 'etag': '"7e287fc885d9fdcf42da3a12f38572c1"', 'strict-transport-security': 'max-age=2592000', 'cache-control': 'max-age=0', 'date': 'Wed, 29 Aug 2012 02:04:24 GMT', 'content-type': 'text/html; charset=utf-8', 'www-authenticate': 'OAuth realm="SoftwareCenter Agent"'}
> '
>
> ======================================================================
> FAIL: test_recagent_query_recommend_me (__main__.TestRecommenderAgent)
> ----------------------------------------------------------------------
> Traceback (most recent call last):
> File "tests/test_recagent.py", line 102, in test_recagent_query_recommend_me
> self.assertServerReturnsWithNoError()
> File "tests/test_recagent.py", line 68, in assertServerReturnsWithNoError
> self.assertFalse(self.error, "got error: '%s'" % self.error_msg)
> AssertionError: got error: 'WARNING:__main__:401: {'status': '401', 'content-length': '22', 'via': '1.1 myrica.canonical.com:3128 (squid/2.7.STABLE7)', 'x-cache': 'MISS from myrica.canonical.com', 'x-cache-lookup': 'MISS from myrica.canonical.com:3128', 'expires': 'Wed, 29 Aug 2012 02:04:27 GMT', 'vary': 'Authorization,Accept-Encoding', '-content-encoding': 'gzip', 'server': 'Apache/2.2.22 (Ubuntu)', 'last-modified': 'Wed, 29 Aug 2012 02:04:27 GMT', 'etag': '"7e287fc885d9fdcf42da3a12f38572c1"', 'strict-transport-security': 'max-age=2592000', 'cache-control': 'max-age=0', 'date': 'Wed, 29 Aug 2012 02:04:27 GMT', 'content-type': 'text/html; charset=utf-8', 'www-authenticate': 'OAuth realm="SoftwareCenter Agent"'}
> '
>
> ----------------------------------------------------------------------
> Ran 10 tests in 15.710s
>
> FAILED (failures=3, skipped=1)
>
> --
> https://code.launchpad.net/~mvo/software-center/recagent-test-cleanup/+merge/121559
> You are the owner of lp:~mvo/software-center/recagent-test-cleanup.

« Back to merge proposal