Skip to content

Commit

Permalink
Merge 72d1f86 into 7682e53
Browse files Browse the repository at this point in the history
  • Loading branch information
twheys committed Aug 7, 2018
2 parents 7682e53 + 72d1f86 commit ae768af
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 8 deletions.
3 changes: 2 additions & 1 deletion fireant/database/vertica.py
Expand Up @@ -51,7 +51,8 @@ def connect(self):

return vertica_python.connect(host=self.host, port=self.port, database=self.database,
user=self.user, password=self.password,
read_timeout=self.read_timeout)
read_timeout=self.read_timeout,
unicode_error='replace')

def fetch(self, query):
return super(VerticaDatabase, self).fetch(query)
Expand Down
18 changes: 11 additions & 7 deletions fireant/tests/database/test_vertica.py
@@ -1,16 +1,19 @@
from unittest import TestCase
from unittest.mock import (
Mock,
patch,
)

from unittest.mock import patch, Mock
from pypika import Field

from fireant import (
hourly,
annually,
daily,
weekly,
hourly,
quarterly,
annually,
weekly,
)
from fireant.database import VerticaDatabase
from pypika import Field


class TestVertica(TestCase):
Expand All @@ -36,8 +39,9 @@ def test_connect(self):

self.assertEqual('OK', result)
mock_vertica.connect.assert_called_once_with(
host='test_host', port=1234, database='test_database',
user='test_user', password='password', read_timeout=None,
host='test_host', port=1234, database='test_database',
user='test_user', password='password',
read_timeout=None, unicode_error='replace'
)

def test_trunc_hour(self):
Expand Down

0 comments on commit ae768af

Please sign in to comment.