Ejemplo n.º 1
0
    def test_create_and_delete(self):
        event = Event.objects.all()[0]
        int_start_time = event.int_UNIXtime_event_start
        event.int_UNIXtime_event_start = round(time.time() + 600)

        event = Meetup().create(event=event, publish_status='draft')
        self.assertTrue(event.url_meetup_event != None)

        event = Meetup().delete(event=event)
        event.int_UNIXtime_event_start = int_start_time
        self.assertTrue(event.url_meetup_event == None)
Ejemplo n.º 2
0
 def create_meetup_event(self):
     from _apis.models import Meetup
     returned_event = Meetup().create(self)
     if returned_event:
         self = returned_event
     return self
Ejemplo n.º 3
0
 def test_events(self):
     events = Meetup('noisebridge').events
     self.assertTrue(len(events) > 0)
     self.assertTrue(events[0]['str_name_en_US'] != None)
     self.assertTrue(events[0]['url_meetup_event'] != None)
Ejemplo n.º 4
0
 def import_from_meetup(self, slug=Config('EVENTS.MEETUP_GROUP').value):
     from _database.models import Event
     from _apis.models import Meetup
     events = Meetup(slug).events(maximum_num_events=1000)
     for event in events:
         Event().create(json_content=event)