Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
AmendsenProject
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Shaik Janipasha
AmendsenProject
Commits
55741f95
Unverified
Commit
55741f95
authored
Aug 10, 2020
by
Dorian Johnson
Committed by
GitHub
Aug 10, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tests: add mock for bigquery auth (#313)
parent
8075a6c7
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
0 deletions
+6
-0
test_bigquery_metadata_extractor.py
tests/unit/extractor/test_bigquery_metadata_extractor.py
+2
-0
test_bigquery_usage_extractor.py
tests/unit/extractor/test_bigquery_usage_extractor.py
+2
-0
test_bigquery_watermark_extractor.py
tests/unit/extractor/test_bigquery_watermark_extractor.py
+2
-0
No files found.
tests/unit/extractor/test_bigquery_metadata_extractor.py
View file @
55741f95
...
@@ -137,6 +137,8 @@ class MockBigQueryClient():
...
@@ -137,6 +137,8 @@ class MockBigQueryClient():
return
self
.
tables_method
return
self
.
tables_method
# Patch fallback auth method to avoid actually calling google API
@
patch
(
'google.auth.default'
,
lambda
scopes
:
[
'dummy'
,
'dummy'
])
class
TestBigQueryMetadataExtractor
(
unittest
.
TestCase
):
class
TestBigQueryMetadataExtractor
(
unittest
.
TestCase
):
def
setUp
(
self
):
def
setUp
(
self
):
# type: () -> None
# type: () -> None
...
...
tests/unit/extractor/test_bigquery_usage_extractor.py
View file @
55741f95
...
@@ -189,6 +189,8 @@ class MockLoggingClient():
...
@@ -189,6 +189,8 @@ class MockLoggingClient():
return
self
.
b
return
self
.
b
# Patch fallback auth method to avoid actually calling google API
@
patch
(
'google.auth.default'
,
lambda
scopes
:
[
'dummy'
,
'dummy'
])
class
TestBigqueryUsageExtractor
(
unittest
.
TestCase
):
class
TestBigqueryUsageExtractor
(
unittest
.
TestCase
):
@
patch
(
'databuilder.extractor.base_bigquery_extractor.build'
)
@
patch
(
'databuilder.extractor.base_bigquery_extractor.build'
)
...
...
tests/unit/extractor/test_bigquery_watermark_extractor.py
View file @
55741f95
...
@@ -83,6 +83,8 @@ class MockBigQueryClient():
...
@@ -83,6 +83,8 @@ class MockBigQueryClient():
return
self
.
jobs_query
return
self
.
jobs_query
# Patch fallback auth method to avoid actually calling google API
@
patch
(
'google.auth.default'
,
lambda
scopes
:
[
'dummy'
,
'dummy'
])
class
TestBigQueryWatermarkExtractor
(
unittest
.
TestCase
):
class
TestBigQueryWatermarkExtractor
(
unittest
.
TestCase
):
def
setUp
(
self
):
def
setUp
(
self
):
# type: () -> None
# type: () -> None
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment