示例#1
0
    def test_min_version_is_valid(self):
        root = make_root()
        add_day(root, index=1, start=datetime(2016, 8, 5, 4, 0), end=datetime(2016, 8, 6, 4, 0))

        schema = get_frabs_schema()
        is_valid = schema.validate(root)
        assert is_valid
示例#2
0
def test_simple_room(frab_schema, request_context):
    root = make_root()
    day = add_day(root, index=1, start=datetime(2016, 8, 5, 4, 0), end=datetime(2016, 8, 6, 4, 0))
    add_room(day, 'the hinterlands')

    is_valid = frab_schema.validate(root)
    assert is_valid
示例#3
0
    def test_simple_room(self):
        root = make_root()
        day = add_day(root, index=1, start=datetime(2016, 8, 5, 4, 0), end=datetime(2016, 8, 6, 4, 0))
        add_room(day, 'the hinterlands')

        schema = get_frabs_schema()
        is_valid = schema.validate(root)
        assert is_valid
示例#4
0
def test_min_version_is_valid(frab_schema, request_context):
    root = make_root()
    add_day(root,
            index=1,
            start=datetime(2016, 8, 5, 4, 0),
            end=datetime(2016, 8, 6, 4, 0))

    is_valid = frab_schema.validate(root)
    assert is_valid
示例#5
0
def test_simple_room(frab_schema, request_context):
    root = make_root()
    day = add_day(root,
                  index=1,
                  start=datetime(2016, 8, 5, 4, 0),
                  end=datetime(2016, 8, 6, 4, 0))
    add_room(day, 'the hinterlands')

    is_valid = frab_schema.validate(root)
    assert is_valid
示例#6
0
    def test_min_version_is_valid(self):
        root = make_root()
        add_day(root,
                index=1,
                start=datetime(2016, 8, 5, 4, 0),
                end=datetime(2016, 8, 6, 4, 0))

        schema = get_frabs_schema()
        is_valid = schema.validate(root)
        assert is_valid
示例#7
0
    def test_simple_room(self):
        root = make_root()
        day = add_day(root,
                      index=1,
                      start=datetime(2016, 8, 5, 4, 0),
                      end=datetime(2016, 8, 6, 4, 0))
        add_room(day, 'the hinterlands')

        schema = get_frabs_schema()
        is_valid = schema.validate(root)
        assert is_valid
示例#8
0
    def test_simple_event(self):
        root = make_root()
        day = add_day(root, index=1, date=datetime(2016, 8, 5))
        room = add_room(day, 'the hinterlands')

        event = {
            'id': 1,
            'title': 'The foo bar',
            'description': 'The foo bar',
            'end_date': datetime(2016, 8, 5, 11, 00),
            'start_date': datetime(2016, 8, 5, 10, 30),
        }

        add_event(room, event)

        schema = get_frabs_schema()
        is_valid = schema.validate(root)
        assert is_valid
示例#9
0
def test_simple_event(frab_schema, request_context):
    root = make_root()
    day = add_day(root, index=1, start=datetime(2016, 8, 5, 4, 0), end=datetime(2016, 8, 6, 4, 0))
    room = add_room(day, 'the hinterlands')

    event = {
        'id': 1,
        'title': 'The foo bar',
        'description': 'The foo bar',
        'speaker': 'Someone',
        'user_id': 123,
        'end_date': datetime(2016, 8, 5, 11, 00),
        'start_date': datetime(2016, 8, 5, 10, 30),
    }

    add_event(room, event)

    is_valid = frab_schema.validate(root)
    assert is_valid
示例#10
0
def test_simple_event(frab_schema, request_context):
    root = make_root()
    day = add_day(root,
                  index=1,
                  start=datetime(2016, 8, 5, 4, 0),
                  end=datetime(2016, 8, 6, 4, 0))
    room = add_room(day, 'the hinterlands')

    event = {
        'id': 1,
        'title': 'The foo bar',
        'description': 'The foo bar',
        'speaker': 'Someone',
        'user_id': 123,
        'end_date': datetime(2016, 8, 5, 11, 00),
        'start_date': datetime(2016, 8, 5, 10, 30),
    }

    add_event(room, event)

    is_valid = frab_schema.validate(root)
    assert is_valid
示例#11
0
def test_min_version_is_valid(frab_schema, request_context):
    root = make_root()
    add_day(root, index=1, start=datetime(2016, 8, 5, 4, 0), end=datetime(2016, 8, 6, 4, 0))

    is_valid = frab_schema.validate(root)
    assert is_valid