Skip to content

Commit 4e40974

Browse files
committed
Allowing delete sketch test to run in all users.
Added delete sketch test in try-except block to handle the case where no sketches are present on the home page.
1 parent 3b2defe commit 4e40974

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed
Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,17 @@
11
from codebender_testing.config import STAGING_SITE_URL
22
from selenium.webdriver.common.by import By
33
from codebender_testing.utils import SeleniumTestCase
4-
import pytest
4+
55

66
class TestDeleteAllSketches(SeleniumTestCase):
77

8-
@pytest.mark.requires_url(STAGING_SITE_URL)
98
def test_delete(self, tester_login):
10-
sketches = self.find_all('#project_list>li .sketch-block-title >a')
11-
projects = []
12-
for sketch in sketches:
13-
projects.append(sketch.text)
14-
for project in projects:
15-
self.delete_project(project)
9+
try:
10+
sketches = self.find_all('#project_list > li .sketch-block-title > a')
11+
projects = []
12+
for sketch in sketches:
13+
projects.append(sketch.text)
14+
for project in projects:
15+
self.delete_project(project)
16+
except:
17+
print 'No sketches found'

0 commit comments

Comments
 (0)