import types

from jupyterhub.spawner import Spawner

from ucrspawner import volumenaming


def test_default_format_volume_name(monkeypatch):
    spawner = Spawner(user=types.SimpleNamespace(name='bar', state={}))
    assert volumenaming.default_format_volume_name('foo-{username}', spawner), 'foo-bar'
    assert volumenaming.default_format_volume_name('foo-{username}/{username}', spawner), \
        'foo-bar/bar'

8c29e29bfef9ed7d125fe8888db71fd4cd8fa444
<mask token>

<mask token>


def test_default_format_volume_name(monkeypatch):
    spawner = Spawner(user=types.SimpleNamespace(name='bar', state={}))
    assert volumenaming.default_format_volume_name('foo-{username}', spawner
        ), 'foo-bar'
    assert volumenaming.default_format_volume_name('foo-{username}/{username}',
        spawner), 'foo-bar/bar'

import types
from jupyterhub.spawner import Spawner
from ucrspawner import volumenaming


def test_default_format_volume_name(monkeypatch):
    spawner = Spawner(user=types.SimpleNamespace(name='bar', state={}))
    assert volumenaming.default_format_volume_name('foo-{username}', spawner
        ), 'foo-bar'
    assert volumenaming.default_format_volume_name('foo-{username}/{username}',
        spawner), 'foo-bar/bar'

import types

from jupyterhub.spawner import Spawner

from ucrspawner import volumenaming


def test_default_format_volume_name(monkeypatch):
    spawner = Spawner(user=types.SimpleNamespace(name='bar', state={}))
    assert volumenaming.default_format_volume_name('foo-{username}', spawner), 'foo-bar'
    assert volumenaming.default_format_volume_name('foo-{username}/{username}', spawner), \
        'foo-bar/bar'
