def test_static_data(self) -> None:

        conf = ConfigFactory.from_dict(
            {
                REST_API_QUERY: RestApiQuerySeed(seed_record=[{'foo': 'bar'}]),
                STATIC_RECORD_DICT: {'john': 'doe'}
            }
        )
        extractor = RestAPIExtractor()
        extractor.init(conf=conf)

        record = extractor.extract()
        expected = {'foo': 'bar', 'john': 'doe'}

        self.assertDictEqual(expected, record)
    def test_model_construction(self) -> None:
        conf = ConfigFactory.from_dict(
            {
                REST_API_QUERY: RestApiQuerySeed(
                    seed_record=[{'dashboard_group': 'foo',
                                  'dashboard_name': 'bar',
                                  'description': 'john',
                                  'dashboard_group_description': 'doe'}]),
                MODEL_CLASS: 'databuilder.models.dashboard.dashboard_metadata.DashboardMetadata',
            }
        )
        extractor = RestAPIExtractor()
        extractor.init(conf=conf)

        record = extractor.extract()
        expected = DashboardMetadata(dashboard_group='foo', dashboard_name='bar', description='john',
                                     dashboard_group_description='doe')

        self.assertEqual(expected.__repr__(), record.__repr__())