Add support for switching between Generic vs SAP OData implementation - #106
Conversation
Added a new config SAP_VENDOR_ENABLED to switch between Generic and SAP implementation of OData v2
DirectBuilder now has a parameter to accept sap_vendor_enabled boolean value. The Decimal and Time generators have support for vendor switching
Codecov Report
@@ Coverage Diff @@
## master #106 +/- ##
==========================================
+ Coverage 61.94% 62.17% +0.23%
==========================================
Files 19 19
Lines 3605 3630 +25
==========================================
+ Hits 2233 2257 +24
- Misses 1372 1373 +1
Continue to review full report at Codecov.
|
| class DirectBuilder: | ||
| """A class for building and initializing all queryable entities with metadata passed in constructor.""" | ||
| def __init__(self, metadata, restrictions,method): | ||
| def __init__(self, metadata, restrictions,method, sap_vendor_enabled = False): |
There was a problem hiding this comment.
I am thinking more about not adding too specific parameter - like the boolean flag here - but entire configuration dictionary, to build the Config class from (line 117).
For the purpose of testing this change, I am OK with merging the PR as is, however created issue #107 addressing this concern.
| assert generated_decimal == '0.000113' | ||
|
|
||
|
|
||
| def test_time_for_sap_vendor_enabled(): |
There was a problem hiding this comment.
missing test for vendor_enabled equals false , same for EDM.Decimal generator. Agreed to add in another PR.
Solves #105