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)
def create_meetup_event(self): from _apis.models import Meetup returned_event = Meetup().create(self) if returned_event: self = returned_event return self
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)
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)