Esempio n. 1
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
Esempio n. 2
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
Esempio n. 3
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
Esempio n. 4
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
Esempio n. 5
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
Esempio n. 6
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
Esempio n. 7
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