@classmethod
def fake_subjects(cls):
    'Generate random subjects.'
    if (not cls._subject_ids):
        subjects = cls._read_vocabulary('subjects')
        for subj in subjects:
            cls._subject_ids.append(subj['id'])
    if (not cls._subject_ids):
        return []
    n = random.choice([0, 1, 2])
    random_ids = random.sample(cls._subject_ids, n)
    return [{'id': i} for i in random_ids]
Generate random subjects.
@classmethod
def fake_subjects(cls):
    
    if (not cls._subject_ids):
        subjects = cls._read_vocabulary('subjects')
        for subj in subjects:
            cls._subject_ids.append(subj['id'])
    if (not cls._subject_ids):
        return []
    n = random.choice([0, 1, 2])
    random_ids = random.sample(cls._subject_ids, n)
    return [{'id': i} for i in random_ids]