Commits

Nicolás Echániz committed b8ab4b8

fixed lettuce features

  • Participants
  • Parent commits 2978722

Comments (0)

Files changed (4)

File demo/demo.db

Binary file modified.

File live/features/enter_channel.feature

 
          Scenario: Enter the default public room
                    Given I access the url "/live"
-                   Then I see the channel message "has joined this channel."
+                   Then I see the channel message "Connected as"
 
          Scenario: Enter a named public room
                    Given I access the url "/live/public/some_channel"
-                   Then I see the channel message "has joined this channel."
+                   Then I see the channel message "Connected as"
 
          Scenario: Try to enter a private room as annonymous user
                    Given I access the url "/live/chat/some_channel"

File live/features/terrain.py

 
 @before.all
 def set_browser():
-#    world.browser = get_driver(FIREFOX, profile='test')
     world.browser = get_driver(FIREFOX)
-#    world.browser.firefox.useExisting = True
 
 @before.all
 def start_orbited():
 
 @after.all
 def teardown_browser(total):
-    world.browser.quit()
+   world.browser.quit()
+   print "Ffirefox terminated"

File live/views.py

     ## the name from an arbitrary URL
     channel_slug = slugify(channel_name)
 
-    session = Session.objects.get(session_key=request.session.session_key)
-    is_subscribed = Channel.objects.filter(participants__session=session,
-                                           slug=channel_slug)
+    session = Session.objects.filter(session_key=request.session.session_key)
+    if session:
+        session = session[0]
+        is_subscribed = Channel.objects.filter(participants__session=session,
+                                               slug=channel_slug)
+    else:
+        is_subscribed = False
 
     ## if a user was participating in a channel and joins again
     ## we show a page to let him kick himself before re-joining