Here are the examples of the python api snap.backends.services.adapters.mock.Mock taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.
1 Examples
3
Example 1
Project: snap Source File: servicedispatchertest.py
def testLoadServices(self):
services_path = os.path.join(os.path.dirname(__file__),
"..", "snap", "backends", "services", "adapters")
services = os.listdir(services_path)
service_classes = []
dispatcher = snap.backends.services.dispatcher.Dispatcher()
for service in services:
if service[0:8] != "__init__" and fnmatch.fnmatch(service, "*.py"):
service = service.replace(".py", "")
service_classes.append(dispatcher.load_service(service).__class__)
# TODO for now just have services tested here statically set, perhaps a better way TODO this?
self.assertIn(snap.backends.services.adapters.iptables.Iptables, service_classes)
self.assertIn(snap.backends.services.adapters.postgresql.Postgresql, service_classes)
self.assertIn(snap.backends.services.adapters.mysql.Mysql, service_classes)
self.assertIn(snap.backends.services.adapters.mock.Mock, service_classes)