Ejemplo n.º 1
0
    def test_register(self):
        history.register(DataContext, fields=['name', 'description', 'json'])
        self.assertTrue(DataContext in history.registry)
        self.assertEqual(history.registry[DataContext], {
            'fields': ('json', 'name', 'description'),
            'dispatch_uid': 'DataContext_revision',
        })

        history.unregister(DataContext)
        self.assertFalse(DataContext in history.registry)
Ejemplo n.º 2
0
    def test_register(self):
        history.register(DataContext, fields=["name", "description", "json"])
        self.assertTrue(DataContext in history.registry)
        self.assertEqual(
            history.registry[DataContext],
            {"fields": ("json", "name", "description"), "dispatch_uid": "DataContext_revision"},
        )

        history.unregister(DataContext)
        self.assertFalse(DataContext in history.registry)
Ejemplo n.º 3
0
    def test_register(self):
        history.register(DataContext, fields=['name', 'description', 'json'])
        self.assertTrue(DataContext in history.registry)
        self.assertEqual(history.registry[DataContext], {
            'fields': ('json', 'name', 'description'),
            'dispatch_uid': 'DataContext_revision',
        })

        history.unregister(DataContext)
        self.assertFalse(DataContext in history.registry)
Ejemplo n.º 4
0
 def tearDown(self):
     history.unregister(DataContext)
Ejemplo n.º 5
0
 def tearDown(self):
     history.unregister(DataContext)