77from pydantic import ValidationError
88
99from fastcs .attributes import Attribute , AttrR , AttrRW
10- from fastcs .backend import Backend
1110from fastcs .controller import Controller
1211from fastcs .datatypes import Bool , Enum , Float , Int , String
1312from fastcs .launch import FastCS
@@ -134,13 +133,13 @@ async def initialise(self):
134133 self .hinted = AttrR (Int ())
135134
136135 # no assertion thrown
137- Backend (ControllerUnspecifiedAccessMode (), loop )
136+ FastCS (ControllerUnspecifiedAccessMode (), [] , loop )
138137
139138
140139def test_hinted_attributes_verified_on_subcontrollers ():
141140 loop = asyncio .get_event_loop ()
142141
143- class ControllerWithWrongType (SubController ):
142+ class ControllerWithWrongType (Controller ):
144143 hinted_missing : AttrR [int ]
145144
146145 async def connect (self ):
@@ -152,7 +151,7 @@ async def initialise(self):
152151 self .register_sub_controller ("MySubController" , subcontroller )
153152
154153 with pytest .raises (RuntimeError , match = "failed to introspect hinted attribute" ):
155- Backend (TopController (), loop )
154+ FastCS (TopController (), [] , loop )
156155
157156
158157def test_hinted_attribute_types_verified ():
@@ -166,12 +165,12 @@ async def initialise(self):
166165 self .read_attr = AttrRW (Int ())
167166
168167 with pytest .raises (RuntimeError , match = "does not match defined access mode" ):
169- Backend (ControllerAttrWrongAccessMode (), loop )
168+ FastCS (ControllerAttrWrongAccessMode (), [] , loop )
170169
171170 class ControllerUnspecifiedAccessMode (Controller ):
172171 unspecified_access_mode : Attribute
173172
174173 async def initialise (self ):
175174 self .unspecified_access_mode = AttrRW (Int ())
176175
177- Backend (ControllerUnspecifiedAccessMode (), loop )
176+ FastCS (ControllerUnspecifiedAccessMode (), [] , loop )
0 commit comments