categories_for_testing   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 1
eloc 18
dl 0
loc 26
rs 10
c 0
b 0
f 0

1 Function

Rating   Name   Duplication   Size   Complexity  
A get_test_race_category() 0 2 1
1
import random
2
3
from models.race import RaceCategory
4
5
categories = [
6
    RaceCategory(
7
        name='A Link to the Past Randomizer', short_name='ALttPR',
8
        slug='alttpr', url='/alttpr', data_url='/alttpr/data',
9
        image='https://racetime.gg/media/alttpr.png'
10
    ),
11
    RaceCategory(
12
        name='Zelda 2 Randomizer', short_name='Z2R', slug='z2r', url='/z2r',
13
        data_url='/z2r/data',
14
        image='https://racetime.gg/media/Zelda_II__The_Adventure_of_Link-285x380.jpg'  # noqa: E501
15
    ),
16
    RaceCategory(
17
        name='Ocarina of Time Randomizer', short_name='OoTR', slug='ootr',
18
        url='/ootr', data_url='/ootr/data',
19
        image='https://racetime.gg/media/zootr.png'
20
    )
21
]
22
23
24
def get_test_race_category():
25
    return random.choice(categories)
26