Code review comment for lp:~james-w/launchpad/fix-getRequestedReviews

Revision history for this message
Aaron Bentley (abentley) wrote :

> It is however untested.

The test fails:

abentley@lumpy:~/launchpad/fix-getRequestedReviews$ bin/test -t xx-branchmergeproposal.txt
Running canonical.testing.layers.PageTestLayer tests:
  Set up canonical.testing.layers.BaseLayer in 0.002 seconds.
  Set up canonical.testing.layers.DatabaseLayer in 0.348 seconds.
  Set up canonical.testing.layers.LibrarianLayer in 7.496 seconds.
  Set up canonical.testing.layers.MemcachedLayer in 0.115 seconds.
  Set up canonical.testing.layers.LaunchpadLayer in 0.000 seconds.
  Set up canonical.testing.layers.FunctionalLayer in 4.550 seconds.
  Set up canonical.testing.layers.GoogleServiceLayer in 2.321 seconds.
  Set up canonical.testing.layers.LaunchpadFunctionalLayer in 0.000 seconds.
  Set up canonical.testing.layers.PageTestLayer in 0.001 seconds.

Failure in test lib/lp/code/tests/../stories/webservice/xx-branchmergeproposal.txt
Failed doctest test for xx-branchmergeproposal.txt
  File "lib/lp/code/tests/../stories/webservice/xx-branchmergeproposal.txt", line 0

----------------------------------------------------------------------
File "lib/lp/code/tests/../stories/webservice/xx-branchmergeproposal.txt", line 474, in xx-branchmergeproposal.txt
Failed example:
    proposals = webservice.named_get('/~target', 'getRequestedReviews'
        ).jsonBody()
Exception raised:
    Traceback (most recent call last):
      File "/home/abentley/launchpad/fix-getRequestedReviews/eggs/zope.testing-3.8.1-py2.5.egg/zope/testing/doctest.py", line 1361, in __run
        compileflags, 1) in test.globs
      File "<doctest xx-branchmergeproposal.txt[line 474, example 119]>", line 1, in <module>
      File "/home/abentley/launchpad/fix-getRequestedReviews/eggs/lazr.restful-0.9.17-py2.5.egg/lazr/restful/testing/webservice.py", line 272, in named_get
        api_version=api_version)
      File "/home/abentley/launchpad/fix-getRequestedReviews/eggs/lazr.restful-0.9.17-py2.5.egg/lazr/restful/testing/webservice.py", line 232, in get
        api_version=api_version)
      File "/home/abentley/launchpad/fix-getRequestedReviews/eggs/lazr.restful-0.9.17-py2.5.egg/lazr/restful/testing/webservice.py", line 221, in __call__
        self.addHeadersTo(full_url, full_headers) # a hook
      File "/home/abentley/launchpad/fix-getRequestedReviews/lib/canonical/launchpad/testing/pages.py", line 139, in addHeadersTo
        self.consumer, self.access_token, http_url = full_url,
      File "/home/abentley/launchpad/fix-getRequestedReviews/lib/contrib/oauth.py", line 216, in from_consumer_and_token
        'oauth_consumer_key': oauth_consumer.key,
      File "/home/abentley/launchpad/fix-getRequestedReviews/eggs/storm-0.15danilo_storm_launchpad_r342-py2.5-linux-i686.egg/storm/properties.py", line 60, in __get__
        return obj_info.variables[column].get()
      File "/home/abentley/launchpad/fix-getRequestedReviews/eggs/storm-0.15danilo_storm_launchpad_r342-py2.5-linux-i686.egg/storm/store.py", line 879, in _resolve_lazy_value
        self.flush()
      File "/home/abentley/launchpad/fix-getRequestedReviews/eggs/storm-0.15danilo_storm_launchpad_r342-py2.5-linux-i686.egg/storm/store.py", line 486, in flush
        self._flush_one(obj_info)
      File "/home/abentley/launchpad/fix-getRequestedReviews/eggs/storm-0.15danilo_storm_launchpad_r342-py2.5-linux-i686.egg/storm/store.py", line 548, in _flush_one
        self._connection.execute(expr, noresult=True)
      File "/home/abentley/launchpad/fix-getRequestedReviews/eggs/storm-0.15danilo_storm_launchpad_r342-py2.5-linux-i686.egg/storm/databases/postgres.py", line 249, in execute
        return Connection.execute(self, statement, params, noresult)
      File "/home/abentley/launchpad/fix-getRequestedReviews/eggs/storm-0.15danilo_storm_launchpad_r342-py2.5-linux-i686.egg/storm/database.py", line 217, in execute
        raw_cursor = self.raw_execute(statement, params)
      File "/home/abentley/launchpad/fix-getRequestedReviews/eggs/storm-0.15danilo_storm_launchpad_r342-py2.5-linux-i686.egg/storm/databases/postgres.py", line 259, in raw_execute
        return Connection.raw_execute(self, statement, params)
      File "/home/abentley/launchpad/fix-getRequestedReviews/eggs/storm-0.15danilo_storm_launchpad_r342-py2.5-linux-i686.egg/storm/database.py", line 299, in raw_execute
        self._check_disconnect(raw_cursor.execute, *args)
      File "/home/abentley/launchpad/fix-getRequestedReviews/eggs/storm-0.15danilo_storm_launchpad_r342-py2.5-linux-i686.egg/storm/database.py", line 342, in _check_disconnect
        return function(*args, **kwargs)
      File "/home/abentley/launchpad/fix-getRequestedReviews/lib/canonical/ftests/pgsql.py", line 108, in execute
        return self.real_cursor.execute(*args, **kwargs)
    IntegrityError: duplicate key value violates unique constraint "person__name__key"

----------------------------------------------------------------------
File "lib/lp/code/tests/../stories/webservice/xx-branchmergeproposal.txt", line 476, in xx-branchmergeproposal.txt
Failed example:
    for proposal in proposals['entries']:
        print_proposal(proposal)
Differences (ndiff with -expected +actual):
    - http://.../~source/fooix/fix-it/+merge/2 - Needs review
    + http://api.launchpad.dev/beta/~source/fooix/fix-it/+merge/2 - Approved

  Ran 23 tests with 1 failures and 0 errors in 6.417 seconds.
Tearing down left over layers:
  Tear down canonical.testing.layers.PageTestLayer in 0.000 seconds.
  Tear down canonical.testing.layers.LaunchpadFunctionalLayer in 0.000 seconds.
  Tear down canonical.testing.layers.LaunchpadLayer in 0.000 seconds.
  Tear down canonical.testing.layers.LibrarianLayer in 0.304 seconds.
  Tear down canonical.testing.layers.MemcachedLayer in 5.015 seconds.
  Tear down canonical.testing.layers.GoogleServiceLayer in 0.061 seconds.
  Tear down canonical.testing.layers.FunctionalLayer ... not supported
  Tear down canonical.testing.layers.DatabaseLayer in 0.031 seconds.
  Tear down canonical.testing.layers.BaseLayer in 0.000 seconds.

review: Needs Fixing

« Back to merge proposal