f42f357fdf
* mirrors: Move tests to mirrors/tests Move the tests to separate files in mirrors/tests and expand the model tests with tests for the Mirror class. * Add CheckLocation test * mirrors: Add tests for template filters Include tests for the filters used in the mirrors views. * devel: Add tests for template filter in_group Include a test for a simple case of the in_group filter.
13 lines
584 B
Python
13 lines
584 B
Python
from mirrors.models import MirrorUrl, MirrorProtocol, Mirror
|
|
|
|
|
|
def create_mirror_url():
|
|
mirror = Mirror.objects.create(name='mirror1',
|
|
admin_email='admin@archlinux.org')
|
|
mirror_protocol = MirrorProtocol.objects.create(protocol='http')
|
|
mirror_url = MirrorUrl.objects.create(url='https://archlinux.org',
|
|
protocol=mirror_protocol,
|
|
mirror=mirror,
|
|
country='US')
|
|
return mirror_url
|