Skip to content

Commit

Permalink
Remove unused hologram-dependent unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jwills committed Oct 26, 2023
1 parent 1d96ad7 commit cc48bca
Showing 1 changed file with 0 additions and 28 deletions.
28 changes: 0 additions & 28 deletions tests/unit/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
from unittest import TestCase, mock

from dbt.config.project import PartialProject
from hologram import ValidationError


def normalize(path):
Expand Down Expand Up @@ -121,33 +120,6 @@ def inject_adapter(value, plugin):
FACTORY.adapters[key] = value


class ContractTestCase(TestCase):
ContractType = None

def setUp(self):
self.maxDiff = None
super().setUp()

def assert_to_dict(self, obj, dct):
self.assertEqual(obj.to_dict(), dct)

def assert_from_dict(self, obj, dct, cls=None):
if cls is None:
cls = self.ContractType
self.assertEqual(cls.from_dict(dct), obj)

def assert_symmetric(self, obj, dct, cls=None):
self.assert_to_dict(obj, dct)
self.assert_from_dict(obj, dct, cls)

def assert_fails_validation(self, dct, cls=None):
if cls is None:
cls = self.ContractType

with self.assertRaises(ValidationError):
cls.from_dict(dct)


def generate_name_macros(package):
from dbt.contracts.graph.parsed import ParsedMacro
from dbt.node_types import NodeType
Expand Down

0 comments on commit cc48bca

Please sign in to comment.