Allow extra_data__field_name params in update and create

Review Request #7669 — Created Oct. 1, 2015 and submitted

Information

RBTools
master

Reviewers

The resource create and update methods now accept keyword arguments
of the form extra_data__field_name which are rewritten to
extra_data.field_name so that Review Board can understand them. This
occurs because extra_data.field_name cannot be used as a keyword
argument, so all extra data field updates have to built into a dict,
which must then be splatted into the appropriate method.

Unit tests have been updated that cover both methods.

Ran unit tests.

Description From Last Updated

Blank line between these.

chipx86chipx86

Hmm, we're repeating quite a bit of code here. Let's get all this moved into a utility function.

chipx86chipx86
reviewbot
  1. Tool: Pyflakes
    Processed Files:
        rbtools/api/tests.py
        rbtools/api/resource.py
    
    
    
    Tool: PEP8 Style Checker
    Processed Files:
        rbtools/api/tests.py
        rbtools/api/resource.py
    
    
  2. 
      
AH
  1. This will be a way more intuitive way to provide extra data. And the comment block is descriptive and easily understood.
    Looks good to me. ^^

  2. 
      
chipx86
  1. 
      
  2. rbtools/api/resource.py (Diff revision 1)
     
     
     
    Show all issues

    Blank line between these.

  3. rbtools/api/resource.py (Diff revision 1)
     
     
     
     
     
     
     
     
     
     
     
     
     
    Show all issues

    Hmm, we're repeating quite a bit of code here. Let's get all this moved into a utility function.

  4. 
      
brennie
reviewbot
  1. Tool: Pyflakes
    Processed Files:
        rbtools/api/tests.py
        rbtools/api/resource.py
    
    
    
    Tool: PEP8 Style Checker
    Processed Files:
        rbtools/api/tests.py
        rbtools/api/resource.py
    
    
  2. 
      
david
  1. Ship It!
  2. 
      
brennie
Review request changed
Status:
Completed
Change Summary:
Pushed to master (e35445f)