Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions js/Library.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
// -*- coding: utf-8 -*-
// Generated by scripts/generate_from_specs.py
// Library

export default {
COMMUNITY: "COMMUNITY",
KOLIBRI: "KOLIBRI",
};
18 changes: 18 additions & 0 deletions le_utils/constants/library.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# -*- coding: utf-8 -*-
# Generated by scripts/generate_from_specs.py
from __future__ import unicode_literals

# Library

COMMUNITY = "COMMUNITY"
KOLIBRI = "KOLIBRI"

choices = (
(COMMUNITY, "Community"),
(KOLIBRI, "Kolibri"),
)

LIBRARYLIST = [
COMMUNITY,
KOLIBRI,
]
4 changes: 4 additions & 0 deletions spec/constants-library.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[
"COMMUNITY",
"KOLIBRI"
]
21 changes: 21 additions & 0 deletions tests/test_library.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals

from le_utils.constants import library


def test_library_constants_exist():
assert library.KOLIBRI == "KOLIBRI"
assert library.COMMUNITY == "COMMUNITY"


def test_library_choices():
choices_dict = dict(library.choices)
assert library.KOLIBRI in choices_dict
assert library.COMMUNITY in choices_dict
assert choices_dict[library.KOLIBRI] == "Kolibri"
assert choices_dict[library.COMMUNITY] == "Community"


def test_LIBRARYLIST_exists():
assert library.LIBRARYLIST, "LIBRARYLIST did not generate properly"
Loading