def test_should_return_records_catalog(self):
     catalog = discover()
     catalog_entry = next(e for e in catalog.streams
                          if e.tap_stream_id == "records")
     assert catalog_entry.stream == "records"
     assert catalog_entry.schema.properties["hours"] is not None
     assert catalog_entry.schema.properties["edited"].properties[
         "date"].type == "string"
 def test_metadata_should_not_have_schema_name(self):
     catalog = discover()
     catalog_dict = catalog.to_dict()
     has_schema_name = any(e for e in catalog_dict["streams"]
                           if "schema-name" in e["metadata"][0]["metadata"])
     assert not has_schema_name
 def test_should_return_users_catalog(self):
     catalog = discover()
     catalog_entry = next(e for e in catalog.streams
                          if e.tap_stream_id == "users")
     assert catalog_entry.stream == "users"
     assert catalog_entry.schema.properties["is_admin"].type == "boolean"
 def test_should_return_projects_catalog(self):
     catalog = discover()
     catalog_entry = next(e for e in catalog.streams
                          if e.tap_stream_id == "projects")
     assert catalog_entry.stream == "projects"
     assert catalog_entry.schema.properties["project_name"].type == "string"
 def test_should_return_all_catalog_entries(self):
     catalog = discover()
     assert len(catalog.streams) == 6