def test_get_secret_volumes_no_target(self):
    secret1 = {'secret': ServiceSecret.parse({'source': 'secret1'}), 'file': 'c.txt'}
    service = Service('web', client=self.mock_client, image='busybox', secrets=[secret1])
    volumes = service.get_secret_volumes()
    assert (volumes[0].source == secret1['file'])
    assert (volumes[0].target == '{}/{}'.format(SECRETS_PATH, secret1['secret'].source))
def test_get_secret_volumes_no_target(self):
    secret1 = {'secret': ServiceSecret.parse({'source': 'secret1'}), 'file': 'c.txt'}
    service = Service('web', client=self.mock_client, image='busybox', secrets=[secret1])
    volumes = service.get_secret_volumes()
    assert (volumes[0].source == secret1['file'])
    assert (volumes[0].target == '{}/{}'.format(SECRETS_PATH, secret1['secret'].source))