Exemplo n.º 1
0
    def test_set_sets_can_associate_data_to_UNDEFINED(self):
        environment = Environment(environment={})

        data = DataSet({'value'}, 6)
        environment.set(UNDEFINED, data)

        # Testing internal attribute which is not ideal, but I am trying to not rely on any other behavior
        # (e.g. without using `get`).
        self.assertDictEqual(environment._environment, {UNDEFINED: data})
Exemplo n.º 2
0
    def test_set_sets_associates_data_to_a_given_variable_name(self):
        environment = Environment(environment={})

        data = DataSet({'value'}, 6)
        environment.set('variable_name', data)

        # Testing internal attribute which is not ideal, but I am trying to not rely on any other behavior
        # (e.g. without using `get`).
        self.assertDictEqual(environment._environment, {'variable_name': data})