File tree Expand file tree Collapse file tree 2 files changed +0
-21
lines changed
Expand file tree Collapse file tree 2 files changed +0
-21
lines changed Original file line number Diff line number Diff line change 2828
2929class CollectorArgs (BaseModel ):
3030 model_config = {"extra" : "forbid" , "exclude_none" : True }
31-
32- @classmethod
33- def build_from_model (cls , datamodel ):
34- """Build collector args instance from data model object
35-
36- Args:
37- datamodel (TDataModel): data model to use for creating collector args
38-
39- Raises:
40- NotImplementedError: Not implemented error
41- """
42- raise NotImplementedError (
43- "Setting collector args from datamodel is not implemented for class: %s" , cls .__name__
44- )
Original file line number Diff line number Diff line change 1- import pytest
2-
31from nodescraper .models import CollectorArgs
42
53
@@ -18,8 +16,3 @@ def test_build_from_model(dummy_data_model):
1816 assert args .args_foo == dummy .foo
1917 dump = args .model_dump (mode = "json" , exclude_none = True )
2018 assert dump == {"args_foo" : 1 }
21-
22-
23- def test_base_build_from_model_not_implemented ():
24- with pytest .raises (NotImplementedError ):
25- CollectorArgs .build_from_model ("anything" )
You can’t perform that action at this time.
0 commit comments