Skip to content

Commit

Permalink
chore: migrate to pytest
Browse files Browse the repository at this point in the history
  • Loading branch information
arjendev committed Nov 8, 2023
1 parent 82058f9 commit 3a1a016
Show file tree
Hide file tree
Showing 4 changed files with 99 additions and 14 deletions.
97 changes: 96 additions & 1 deletion src/python/poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions src/python/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ azure-mgmt-datafactory = "^3.1.0"
azure-identity = "^1.14.1"
astor = "^0.8.1"
docstring-parser = "^0.15"
pytest = "^7.4.3"


[build-system]
Expand Down
Empty file added src/python/tests/__init__.py
Empty file.
15 changes: 2 additions & 13 deletions src/python/tests/playground/example_test.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
import json
import unittest
from unittest import TestCase

from azure.mgmt.datafactory import models as _models

from data_factory_testing_framework.generated import Deserializer
Expand All @@ -23,23 +20,15 @@ def evaluate(activity: WebActivity):
activity.body.evaluate()


class TestPipeline(TestCase):
class TestPipeline:
pipeline: PipelineResource

@classmethod
def setUpClass(cls):
cls.pipeline = get_pipeline()

def test_web_activity(self):
# Arrange
web_activity: WebActivity = self.pipeline.activities[0]
web_activity: WebActivity = get_pipeline().activities[0]

# Act
evaluate(web_activity)

# Assert
assert web_activity.body.value == "test2"


if __name__ == '__main__':
unittest.main()

0 comments on commit 3a1a016

Please sign in to comment.