Exemplo n.º 1
0
def barcamp_with_event(request):
    """example barcamp"""
    bc = Barcamp(
        name = "Barcamp",
        description = "cool barcamp",
        slug = "barcamp",
        start_date = datetime.date(2012,7,13),
        end_date = datetime.date(2012,7,15)
    )

    event = {
        'name'              : 'Day 1',
        'description'       : 'Description 1',
        'date'              : datetime.date(2012,7,13),
        'start_time'        : '10:00',
        'end_time'          : '18:00',
        'size'              : 10,
        'own_location'      : False,
        'timetable'         : {
            'rooms'         : [],
            'timeslots'     : [],
            'sessions'      : {}
        }
    }
    event = bc.add_event(Event(event))
    return bc
Exemplo n.º 2
0
def test_event(barcamps):

    barcamp = Barcamp(name="Barcamp",
                      description="cool barcamp",
                      slug="barcamp",
                      location={
                          'name': "Example City",
                      },
                      start_date=datetime.date(2012, 7, 13),
                      end_date=datetime.date(2012, 7, 15))

    bc = barcamps.save(barcamp)
    bc = barcamps.get(bc._id)

    event = {
        'name': 'Day 1',
        'description': 'Description 1',
        'date': datetime.date(2012, 7, 13),
        'start_time': '10:00',
        'end_time': '18:00',
        'size': 10,
        'own_location': False,
    }
    event = barcamp.add_event(Event(event))
    eid = event['_id']

    bc = barcamps.save(barcamp)
    bc = barcamps.get(bc._id)

    assert bc.events[eid]['name'] == "Day 1"
Exemplo n.º 3
0
def test_event(barcamps):

    barcamp = Barcamp(
        name = "Barcamp",
        description = "cool barcamp",
        slug = "barcamp",
        location = {
            'name' : "Example City",
        },
        start_date = datetime.date(2012,7,13),
        end_date = datetime.date(2012,7,15)
    )

    bc = barcamps.save(barcamp)
    bc = barcamps.get(bc._id)


    event = {
        'name'              : 'Day 1',
        'description'       : 'Description 1',
        'date'              : datetime.date(2012,7,13),
        'start_time'        : '10:00',
        'end_time'          : '18:00',
        'size'              : 10,
        'own_location'      : False,
    }
    event = barcamp.add_event(Event(event))
    eid = event['_id']

    bc = barcamps.save(barcamp)
    bc = barcamps.get(bc._id)

    assert bc.events[eid]['name'] == "Day 1"
Exemplo n.º 4
0
def barcamp_with_event(request):
    """example barcamp"""
    bc = Barcamp(name="Barcamp",
                 description="cool barcamp",
                 slug="barcamp",
                 start_date=datetime.date(2012, 7, 13),
                 end_date=datetime.date(2012, 7, 15))

    event = {
        'name': 'Day 1',
        'description': 'Description 1',
        'date': datetime.date(2012, 7, 13),
        'start_time': '10:00',
        'end_time': '18:00',
        'size': 10,
        'own_location': False,
        'timetable': {
            'rooms': [],
            'timeslots': [],
            'sessions': {}
        }
    }
    event = bc.add_event(Event(event))
    return bc