Uploaded image for project: 'Couchbase Python Client Library'
  1. Couchbase Python Client Library
  2. PYCBC-744

Ensure precedence between named param and option block is described

    XMLWordPrintable

Details

    • New Feature
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 3.0.0-beta.2
    • 3.0.0
    • docs
    • None
    • 1
    • SDK13: Coll/Txn/Docs More Chip, SDK15: Ruby/Coll/Docs

    Description

      In discussion, we need to be sure we cover this. This ticket is mainly to review to make sure they're all complete where appropriate.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          david.kelly David Kelly added a comment -

          I think in a perfect world, we'd mock lcb, call everything and verify that the options make it to lcb, and that the precedence is correct.  But, since we don't have that in place (I think we could do it, and it is worth doing), maybe the task here it to be sure we test this in at least some of the tests (we do – collection tests and query do that for sure).  Then, a look through the code to be sure we are really doing the same thing everywhere, and we should be good.  I've done that for bucket, collection and cluster interfaces.   So...

          Maybe there is a task to research mocking out LCB so we can test that what we think we are doing is really happening.   Nice thing is that if we can mock lcb, it will be fast to just go through everything.  I think that is as simple as mocking the base class (which is couchbase_core._libcouchbase.Bucket).  Then, we'd probably want to figure out a clean way to specify what the options and kwargs should be, and what the actual call in Bucket should receive.  In fact, we could do the same thing for response classes – mock lcb and test that what the mock returns is properly represented in the responses.  Though, that is perhaps tricky for the stuff we iterate over.

          I'd suggest we consider this closed, and make a new issue (or just make this ticket that new issue) for doing some lcb mocking. Matt Ingenthron - what do you think?

          david.kelly David Kelly added a comment - I think in a perfect world, we'd mock lcb, call everything and verify that the options make it to lcb, and that the precedence is correct.  But, since we don't have that in place (I think we could do it, and it is worth doing), maybe the task here it to be sure we test this in at least some of the tests (we do – collection tests and query do that for sure).  Then, a look through the code to be sure we are really doing the same thing everywhere, and we should be good.  I've done that for bucket, collection and cluster interfaces.   So... Maybe there is a task to research mocking out LCB so we can test that what we think we are doing is really happening.   Nice thing is that if we can mock lcb, it will be fast to just go through everything.  I think that is as simple as mocking the base class (which is couchbase_core._libcouchbase.Bucket ).  Then, we'd probably want to figure out a clean way to specify what the options and kwargs should be, and what the actual call in Bucket should receive.  In fact, we could do the same thing for response classes – mock lcb and test that what the mock returns is properly represented in the responses.  Though, that is perhaps tricky for the stuff we iterate over. I'd suggest we consider this closed, and make a new issue (or just make this ticket that new issue) for doing some lcb mocking. Matt Ingenthron  - what do you think?
          david.kelly David Kelly added a comment -

          Will open new ticket for mocking lcb entirely. That is a better long-term strategy for this, but in the short run we have many tests that verify we are doing this, it just doesn't test every call and every option.

          david.kelly David Kelly added a comment - Will open new ticket for mocking lcb entirely. That is a better long-term strategy for this, but in the short run we have many tests that verify we are doing this, it just doesn't test every call and every option.

          People

            Ellis.Breen Ellis Breen
            ingenthr Matt Ingenthron
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty