Skip to content

Commit

Permalink
Fix borked unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Greenfeld committed Jul 7, 2015
1 parent 715711e commit fff2c36
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions tests/integration/test_events.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@

from ..base import unittest

try:
OAUTH_TOKEN = os.environ[u'EVENTBRITE_OAUTH_TOKEN']
OAUTH_TOKEN = os.environ.get('EVENTBRITE_OAUTH_TOKEN', '')
if OAUTH_TOKEN:
skip_integration_tests = False
except KeyError:
else:
skip_integration_tests = True

try:
Expand Down Expand Up @@ -56,6 +56,8 @@ def test_search_events(self):
events = self.eventbrite.event_search(**data)
self.assertLess(events['pagination'][u'object_count'], 1000)

@unittest.skipIf(
condition=skip_integration_tests, reason='Needs an OAUTH_TOKEN')
def test_publish_unpublish_event(self):

""" First, creat a draft event """
Expand All @@ -80,6 +82,8 @@ def test_publish_unpublish_event(self):
self.assertTrue(response.ok,
msg=response.get('error_description', None))

@unittest.skipIf(
condition=skip_integration_tests, reason='Needs an OAUTH_TOKEN')
def test_create_ticket_class(self):

event_data = self._get_event_data()
Expand Down

0 comments on commit fff2c36

Please sign in to comment.