def test_DotDict_initialization_with_keywords(self):
     dot_dict = DotDict(
         alpha=1,
         beta=2,
         gamma=5,
     )
     self.assertEqual(dot_dict.alpha, 1)
     self.assertEqual(dot_dict.beta, 2)
     self.assertEqual(dot_dict.gamma, 5)
 def test_DotDict_initialization_with_dict_parameter(self):
     dot_dict = DotDict({
         'alpha': 1,
         'beta': 2,
         'gamma': 5,
     }, )
     self.assertEqual(dot_dict.alpha, 1)
     self.assertEqual(dot_dict.beta, 2)
     self.assertEqual(dot_dict.gamma, 5)
 def test_DotDict_initialization_with_keywords_and_dict(self):
     dot_dict = DotDict(
         {
             'alpha': 1,
             'beta': 2
         },
         gamma=5,
     )
     self.assertEqual(dot_dict.alpha, 1)
     self.assertEqual(dot_dict.beta, 2)
     self.assertEqual(dot_dict.gamma, 5)
 def test_DotDict_JSON(self):
     dict_value = {
         'hello': 'hello',
         'test': {
             'wow': 100,
             'other': 1.222
         },
         'list': [
             1,
             2,
             'hello',
             {
                 'test': [1, 2, None],
             },
         ],
     }
     dot_dict_value = DotDict(dict_value)
     dict_json_string = json.dumps(dict_value)
     dot_json_string = json.dumps(dot_dict_value)
     self.assertEqual(dict_json_string, dot_json_string)
from dot_notation_dictionary import DotDict, DefaultDotDict, NestingDotDict

import unittest
import json

test_dot_dict = DotDict(
    alpha=1,
    beta=2,
    gamma=5,
)

test_default_dot_dict = DefaultDotDict(
    'default_value',
    alpha=1,
    beta=2,
    gamma=5,
)

test_nesting_dot_dict = NestingDotDict(
    alpha=1,
    beta=2,
    gamma={
        'hello': 'hi',
        'goodbye': 'bye',
    },
)


class TestDotDictMethods(unittest.TestCase):
    def test_DotDict_isinstances(self):
        self.assertEqual(isinstance(test_dot_dict, dict), True)