Skip to content

Commit

Permalink
4827 Facebook Marketing test fixes
Browse files Browse the repository at this point in the history
Update values in `abnormal_state.json` because they contained outdated values.
Add base class for `TestFacebookMarketingSource`.
Use `empty_streams` instead of `validate_output_from_all_streams`.
  • Loading branch information
Zirochkaa committed Jul 26, 2021
1 parent e8f20b2 commit e3aaf5e
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 12 deletions.
Expand Up @@ -14,7 +14,11 @@ tests:
basic_read:
- config_path: "secrets/config.json"
configured_catalog_path: "integration_tests/configured_catalog.json"
validate_output_from_all_streams: yes
empty_streams:
- ads_insights
- ads_insights_age_and_gender
- ad_sets
- ads
# FB serializes numeric fields as strings
validate_schema: no
incremental:
Expand Down
@@ -1,42 +1,42 @@
{
"campaigns": {
"updated_time": "2021-07-25T13:34:26Z",
"updated_time": "2121-07-25T13:34:26Z",
"include_deleted": true
},
"ad_creatives": {
"updated_time": "2021-07-25T13:34:26Z",
"updated_time": "2121-07-25T13:34:26Z",
"include_deleted": true
},
"ad_sets": {
"updated_time": "2021-07-25T13:34:26Z",
"updated_time": "2121-07-25T13:34:26Z",
"include_deleted": true
},
"ads": {
"updated_time": "2021-07-25T13:34:26Z",
"updated_time": "2121-07-25T13:34:26Z",
"include_deleted": true
},
"ads_insights": {
"date_start": "2021-07-25T13:34:26Z",
"date_start": "2121-07-25T13:34:26Z",
"include_deleted": true
},
"ads_insights_age_and_gender": {
"date_start": "2021-07-25T13:34:26Z",
"date_start": "2121-07-25T13:34:26Z",
"include_deleted": true
},
"ads_insights_country": {
"date_start": "2021-07-25T13:34:26Z",
"date_start": "2121-07-25T13:34:26Z",
"include_deleted": true
},
"ads_insights_dma": {
"date_start": "2021-07-25T13:34:26Z",
"date_start": "2121-07-25T13:34:26Z",
"include_deleted": true
},
"ads_insights_platfrom_and_device": {
"date_start": "2021-07-25T13:34:26Z",
"date_start": "2121-07-25T13:34:26Z",
"include_deleted": true
},
"ads_insights_region": {
"date_start": "2021-07-25T13:34:26Z",
"date_start": "2121-07-25T13:34:26Z",
"include_deleted": true
}
}
Expand Up @@ -27,6 +27,7 @@
from typing import Any, List, MutableMapping, Set, Tuple

import pytest
from source_acceptance_test.base import BaseTest
from airbyte_cdk import AirbyteLogger
from airbyte_cdk.models import AirbyteMessage, ConfiguredAirbyteCatalog, Type
from source_facebook_marketing.source import SourceFacebookMarketing
Expand Down Expand Up @@ -55,7 +56,7 @@ def configured_catalog_fixture():
return ConfiguredAirbyteCatalog.parse_file("integration_tests/configured_catalog.json")


class TestFacebookMarketingSource:
class TestFacebookMarketingSource(BaseTest):
@pytest.mark.parametrize(
"stream_name, deleted_id", [("ads", "23846756820320398"), ("campaigns", "23846541919710398"), ("ad_sets", "23846541706990398")]
)
Expand Down

0 comments on commit e3aaf5e

Please sign in to comment.