"password" : password,
}
- def setUp(self):
+ async def asyncSetUp(self):
# Create a configuration file
conf = configparser.ConfigParser()
# Create handle to the database
self.db = self.backend.db
- # Some random objects that are created on-demand so that we won't have to
- # start from scratch each time...
+ # Create some default objects
+ await self._create_default_objects()
- @functools.cached_property
- def distro(self):
+ async def _create_default_objects(self):
"""
- Creates a distribution
+ Creates some random objects that are created by default so
+ that we won't have to start from scratch each time...
"""
- return self.backend.distros.create("Test Distribution 1", "test1")
+ # Create a distribution
+ self.distro = self.backend.distros.create("Default Test Distribution", "test1")
+
+ # Create a repository
+ self.repo = await self.backend.repos.create(self.distro, "Default Test Repository")