'Should be able to create an event'

def test_create_event(self):

    self.browser.visit('http://www.facebook.com')
    self.do_login_if_need(username='user', password='pass')
    self.browser.find_by_css('li#navItem_events    a').first.click()
    self.browser.find_by_css('div.uiHeaderTop    a.uiButton').first.click()
    time.sleep(1)
    picture_path = os.path.join(os.path.abspath(os.path.dirname(__file__)), 'img', 'turtles.jpg')
    self.browser.find_by_css('div.eventEditUpload    a.uiButton').first.click()
    if (not self.browser.is_element_present_by_css('iframe#upload_pic_frame', wait_time=10)):
        self.fail("The    upload    pic    iframe    didn't    appear    :(")
    with self.browser.get_iframe('upload_pic_frame') as frame:
        frame.attach_file('pic', picture_path)
        time.sleep(10)
    self.browser.fill('event_startIntlDisplay', '5/21/2011')
    self.browser.select('start_time_min', '480')
    self.browser.fill('name', 'Splinter    sprint')
    self.browser.fill('location', 'Rio    de    Janeiro,    Brazil')
    self.browser.fill('desc', 'For    more    info,    check    out    the    #cobratem    channel    on    freenode!')
    self.browser.find_by_css('label.uiButton    input[type="submit"]').first.click()
    time.sleep(1)
    title = self.browser.find_by_css('h1    span').first.text
    assert (title == 'Splinter    sprint'), title
