-
Notifications
You must be signed in to change notification settings - Fork 141
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* All fields Test using new framework * Add method to exclude the non-upsert fields * Implemented PR Review comments * excluded the problematic streams
- Loading branch information
1 parent
37274c3
commit 7a94090
Showing
2 changed files
with
249 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
""" | ||
Test that with no fields selected for a stream all fields are still replicated | ||
""" | ||
|
||
from tap_tester.base_suite_tests.all_fields_test import AllFieldsTest | ||
from base_new_frmwrk import FacebookBaseTest | ||
import base | ||
|
||
|
||
class FacebookAllFieldsTest(AllFieldsTest, FacebookBaseTest): | ||
"""Test that with no fields selected for a stream all fields are still replicated""" | ||
is_done = None | ||
|
||
@staticmethod | ||
def name(): | ||
return "tt_facebook_all_fields_test" | ||
|
||
def streams_to_test(self): | ||
#return set(self.expected_metadata().keys()) | ||
# Fail the test when the JIRA card is done to allow stream to be re-added and tested | ||
if self.is_done is None: | ||
self.is_done = base.JIRA_CLIENT.get_status_category("TDL-24312") == 'done' | ||
self.assert_message = ("JIRA ticket has moved to done, re-add the " | ||
"ads_insights_hourly_advertiser stream to the test.") | ||
assert self.is_done != True, self.assert_message | ||
|
||
return self.expected_metadata().keys() - {'ads_insights_hourly_advertiser', 'ads_insights'} | ||
|
||
def test_all_fields_for_streams_are_replicated(self): | ||
self.selected_fields = self.get_upsert_only_fields(AllFieldsTest.selected_fields) | ||
super().test_all_fields_for_streams_are_replicated() |