Skip to content

Commit

Permalink
Merge pull request #1 from marcelblijleven/fix/ci-pr
Browse files Browse the repository at this point in the history
test: use root dir with file path
  • Loading branch information
marcelblijleven authored Aug 16, 2021
2 parents e5e991a + a1822e1 commit ee2f881
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tests/test_processor.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,19 @@
import os

from datetime import datetime
from unittest import TestCase, mock

from goodwe.processor import GoodWeXSProcessor, InvalidDataException

root_dir = os.path.dirname(os.path.abspath(__file__))


class TestProcessor(TestCase):
def test_process_data(self):
validator = mock.Mock()
validator.return_value = True

with open('sample/inverter_data', 'rb') as f:
with open(root_dir + '/sample/inverter_data', 'rb') as f:
mock_data = f.read()

processor = GoodWeXSProcessor(validator)
Expand Down

0 comments on commit ee2f881

Please # to comment.