Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Jochem Bijlard
fractalis
Commits
f6bc4fae
Commit
f6bc4fae
authored
Apr 24, 2018
by
Sascha Herzinger
Browse files
Fixing tests
parent
59c3e31b
Changes
6
Hide whitespace changes
Inline
Side-by-side
tests/unit/etls/ada/test_etl_boolean.py
View file @
f6bc4fae
...
...
@@ -41,7 +41,7 @@ class TestBooleanETL:
def
test_extract_raises_readable_if_not_200
(
self
):
with
responses
.
RequestsMock
()
as
response
:
response
.
add
(
response
.
GET
,
'http://foo.bar/
studie
s/records/findCustom'
,
'http://foo.bar/
dataSet
s/records/findCustom'
,
body
=
'{}'
,
status
=
400
,
content_type
=
'application/json'
)
...
...
@@ -54,7 +54,7 @@ class TestBooleanETL:
def
test_extract_raises_readable_if_not_json
(
self
):
with
responses
.
RequestsMock
()
as
response
:
response
.
add
(
response
.
GET
,
'http://foo.bar/
studie
s/records/findCustom'
,
'http://foo.bar/
dataSet
s/records/findCustom'
,
body
=
'abc{//}'
,
status
=
200
,
content_type
=
'application/json'
)
...
...
@@ -68,7 +68,7 @@ class TestBooleanETL:
body
=
json
.
dumps
([{
'a'
:
True
,
'_id'
:
{
'$oid'
:
'12345'
}}])
with
responses
.
RequestsMock
()
as
response
:
response
.
add
(
response
.
GET
,
'http://foo.bar/
studie
s/records/findCustom'
,
'http://foo.bar/
dataSet
s/records/findCustom'
,
body
=
body
,
status
=
200
,
content_type
=
'application/json'
)
...
...
@@ -81,7 +81,7 @@ class TestBooleanETL:
body
=
json
.
dumps
([{
'a'
:
True
,
'_id'
:
{
'$oid'
:
'12345'
}}])
with
responses
.
RequestsMock
()
as
response
:
response
.
add
(
response
.
GET
,
'http://foo.bar/
studie
s/records/findCustom'
,
'http://foo.bar/
dataSet
s/records/findCustom'
,
body
=
body
,
status
=
200
,
content_type
=
'application/json'
)
...
...
tests/unit/etls/ada/test_etl_double.py
View file @
f6bc4fae
...
...
@@ -41,7 +41,7 @@ class TestDoubleETL:
def
test_extract_raises_readable_if_not_200
(
self
):
with
responses
.
RequestsMock
()
as
response
:
response
.
add
(
response
.
GET
,
'http://foo.bar/
studie
s/records/findCustom'
,
'http://foo.bar/
dataSet
s/records/findCustom'
,
body
=
'{}'
,
status
=
400
,
content_type
=
'application/json'
)
...
...
@@ -54,7 +54,7 @@ class TestDoubleETL:
def
test_extract_raises_readable_if_not_json
(
self
):
with
responses
.
RequestsMock
()
as
response
:
response
.
add
(
response
.
GET
,
'http://foo.bar/
studie
s/records/findCustom'
,
'http://foo.bar/
dataSet
s/records/findCustom'
,
body
=
'abc{//}'
,
status
=
200
,
content_type
=
'application/json'
)
...
...
@@ -68,7 +68,7 @@ class TestDoubleETL:
body
=
json
.
dumps
([{
'a'
:
1.1
,
'_id'
:
{
'$oid'
:
'12345'
}}])
with
responses
.
RequestsMock
()
as
response
:
response
.
add
(
response
.
GET
,
'http://foo.bar/
studie
s/records/findCustom'
,
'http://foo.bar/
dataSet
s/records/findCustom'
,
body
=
body
,
status
=
200
,
content_type
=
'application/json'
)
...
...
@@ -81,7 +81,7 @@ class TestDoubleETL:
body
=
json
.
dumps
([{
'a'
:
1.1
,
'_id'
:
{
'$oid'
:
'12345'
}}])
with
responses
.
RequestsMock
()
as
response
:
response
.
add
(
response
.
GET
,
'http://foo.bar/
studie
s/records/findCustom'
,
'http://foo.bar/
dataSet
s/records/findCustom'
,
body
=
body
,
status
=
200
,
content_type
=
'application/json'
)
...
...
tests/unit/etls/ada/test_etl_double_array.py
View file @
f6bc4fae
...
...
@@ -42,7 +42,7 @@ class TestDoubleETL:
def
test_extract_raises_readable_if_not_200
(
self
):
with
responses
.
RequestsMock
()
as
response
:
response
.
add
(
response
.
GET
,
'http://foo.bar/
studie
s/records/findCustom'
,
'http://foo.bar/
dataSet
s/records/findCustom'
,
body
=
'{}'
,
status
=
400
,
content_type
=
'application/json'
)
...
...
@@ -55,7 +55,7 @@ class TestDoubleETL:
def
test_extract_raises_readable_if_not_json
(
self
):
with
responses
.
RequestsMock
()
as
response
:
response
.
add
(
response
.
GET
,
'http://foo.bar/
studie
s/records/findCustom'
,
'http://foo.bar/
dataSet
s/records/findCustom'
,
body
=
'abc{//}'
,
status
=
200
,
content_type
=
'application/json'
)
...
...
@@ -69,7 +69,7 @@ class TestDoubleETL:
body
=
json
.
dumps
([{
'a'
:
1.1
,
'_id'
:
{
'$oid'
:
'12345'
}}])
with
responses
.
RequestsMock
()
as
response
:
response
.
add
(
response
.
GET
,
'http://foo.bar/
studie
s/records/findCustom'
,
'http://foo.bar/
dataSet
s/records/findCustom'
,
body
=
body
,
status
=
200
,
content_type
=
'application/json'
)
...
...
@@ -82,7 +82,7 @@ class TestDoubleETL:
body
=
json
.
dumps
([{
'a'
:
1.1
,
'_id'
:
{
'$oid'
:
'12345'
}}])
with
responses
.
RequestsMock
()
as
response
:
response
.
add
(
response
.
GET
,
'http://foo.bar/
studie
s/records/findCustom'
,
'http://foo.bar/
dataSet
s/records/findCustom'
,
body
=
body
,
status
=
200
,
content_type
=
'application/json'
)
...
...
tests/unit/etls/ada/test_etl_enum.py
View file @
f6bc4fae
...
...
@@ -42,7 +42,7 @@ class TestEnumETL:
def
test_extract_raises_readable_if_not_200
(
self
):
with
responses
.
RequestsMock
()
as
response
:
response
.
add
(
response
.
GET
,
'http://foo.bar/
studie
s/records/findCustom'
,
'http://foo.bar/
dataSet
s/records/findCustom'
,
body
=
'{}'
,
status
=
400
,
content_type
=
'application/json'
)
...
...
@@ -55,7 +55,7 @@ class TestEnumETL:
def
test_extract_raises_readable_if_not_json
(
self
):
with
responses
.
RequestsMock
()
as
response
:
response
.
add
(
response
.
GET
,
'http://foo.bar/
studie
s/records/findCustom'
,
'http://foo.bar/
dataSet
s/records/findCustom'
,
body
=
'abc{//}'
,
status
=
200
,
content_type
=
'application/json'
)
...
...
@@ -69,7 +69,7 @@ class TestEnumETL:
body
=
json
.
dumps
([{
'foo'
:
0
,
'_id'
:
{
'$oid'
:
'12345'
}}])
with
responses
.
RequestsMock
()
as
response
:
response
.
add
(
response
.
GET
,
'http://foo.bar/
studie
s/records/findCustom'
,
'http://foo.bar/
dataSet
s/records/findCustom'
,
body
=
body
,
status
=
200
,
content_type
=
'application/json'
)
...
...
@@ -82,7 +82,7 @@ class TestEnumETL:
body
=
json
.
dumps
([{
'foo'
:
0
,
'_id'
:
{
'$oid'
:
'12345'
}}])
with
responses
.
RequestsMock
()
as
response
:
response
.
add
(
response
.
GET
,
'http://foo.bar/
studie
s/records/findCustom'
,
'http://foo.bar/
dataSet
s/records/findCustom'
,
body
=
body
,
status
=
200
,
content_type
=
'application/json'
)
...
...
tests/unit/etls/ada/test_etl_integer.py
View file @
f6bc4fae
...
...
@@ -41,7 +41,7 @@ class TestIntegerETL:
def
test_extract_raises_readable_if_not_200
(
self
):
with
responses
.
RequestsMock
()
as
response
:
response
.
add
(
response
.
GET
,
'http://foo.bar/
studie
s/records/findCustom'
,
'http://foo.bar/
dataSet
s/records/findCustom'
,
body
=
'{}'
,
status
=
400
,
content_type
=
'application/json'
)
...
...
@@ -54,7 +54,7 @@ class TestIntegerETL:
def
test_extract_raises_readable_if_not_json
(
self
):
with
responses
.
RequestsMock
()
as
response
:
response
.
add
(
response
.
GET
,
'http://foo.bar/
studie
s/records/findCustom'
,
'http://foo.bar/
dataSet
s/records/findCustom'
,
body
=
'abc{//}'
,
status
=
200
,
content_type
=
'application/json'
)
...
...
@@ -68,7 +68,7 @@ class TestIntegerETL:
body
=
json
.
dumps
([{
'a'
:
1
,
'_id'
:
{
'$oid'
:
'12345'
}}])
with
responses
.
RequestsMock
()
as
response
:
response
.
add
(
response
.
GET
,
'http://foo.bar/
studie
s/records/findCustom'
,
'http://foo.bar/
dataSet
s/records/findCustom'
,
body
=
body
,
status
=
200
,
content_type
=
'application/json'
)
...
...
@@ -81,7 +81,7 @@ class TestIntegerETL:
body
=
json
.
dumps
([{
'a'
:
1
,
'_id'
:
{
'$oid'
:
'12345'
}}])
with
responses
.
RequestsMock
()
as
response
:
response
.
add
(
response
.
GET
,
'http://foo.bar/
studie
s/records/findCustom'
,
'http://foo.bar/
dataSet
s/records/findCustom'
,
body
=
body
,
status
=
200
,
content_type
=
'application/json'
)
...
...
tests/unit/etls/ada/test_etl_string.py
View file @
f6bc4fae
...
...
@@ -41,7 +41,7 @@ class TestStringETL:
def
test_extract_raises_readable_if_not_200
(
self
):
with
responses
.
RequestsMock
()
as
response
:
response
.
add
(
response
.
GET
,
'http://foo.bar/
studie
s/records/findCustom'
,
'http://foo.bar/
dataSet
s/records/findCustom'
,
body
=
'{}'
,
status
=
400
,
content_type
=
'application/json'
)
...
...
@@ -54,7 +54,7 @@ class TestStringETL:
def
test_extract_raises_readable_if_not_json
(
self
):
with
responses
.
RequestsMock
()
as
response
:
response
.
add
(
response
.
GET
,
'http://foo.bar/
studie
s/records/findCustom'
,
'http://foo.bar/
dataSet
s/records/findCustom'
,
body
=
'abc{//}'
,
status
=
200
,
content_type
=
'application/json'
)
...
...
@@ -68,7 +68,7 @@ class TestStringETL:
body
=
json
.
dumps
([{
'a'
:
'abc'
,
'_id'
:
{
'$oid'
:
'12345'
}}])
with
responses
.
RequestsMock
()
as
response
:
response
.
add
(
response
.
GET
,
'http://foo.bar/
studie
s/records/findCustom'
,
'http://foo.bar/
dataSet
s/records/findCustom'
,
body
=
body
,
status
=
200
,
content_type
=
'application/json'
)
...
...
@@ -81,7 +81,7 @@ class TestStringETL:
body
=
json
.
dumps
([{
'a'
:
'abc'
,
'_id'
:
{
'$oid'
:
'12345'
}}])
with
responses
.
RequestsMock
()
as
response
:
response
.
add
(
response
.
GET
,
'http://foo.bar/
studie
s/records/findCustom'
,
'http://foo.bar/
dataSet
s/records/findCustom'
,
body
=
body
,
status
=
200
,
content_type
=
'application/json'
)
...
...
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