-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Clean up import of isi_sdk_7_2 and pytest #17
base: master
Are you sure you want to change the base?
Changes from all commits
2d7fbc3
c90016f
2ee179c
957ba37
83cb23c
e5423a9
282344d
e66e7e8
2aeeb84
4ea36c8
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,3 +5,4 @@ mock>=2.0.0 | |
jinja2>=2.8 | ||
pylint>=1.5.5 | ||
urllib3 >= 1.15 | ||
isi_sdk_7_2>=0.1.2 | ||
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -1,3 +1,4 @@ | ||||||
future>=0.15.2 | ||||||
jinja2>=2.8 | ||||||
urllib3 >= 1.15 | ||||||
urllib3>=1.15 | ||||||
isi_sdk_7_2>=0.1.2 | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 0.2.x contains backwards-incompatible changes (see #19).
Suggested change
The compatible release operator should cause the latest compatible |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,10 +5,10 @@ | |
try: | ||
# Try the original SDK library name | ||
import isi_sdk | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Seems like this should be: import isi_sdk_7_2 or import isi_sdk_7_2 as isi_sdk There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The intent here is to allow functioning with either So it first tries importing isi_sdk_7_2, if that fails then it tries for the deprecated SDK library. |
||
except ImportError as err: | ||
print('Unable to import isi_sdk_7_2. Please install the Isilon SDK.') | ||
except ImportError: | ||
print('Unable to import isi_sdk_7_2. Please install the Isilon SDK:') | ||
print('pip install isi_sdk_7_2') | ||
print('See https://github.com/isilon') | ||
print(err) | ||
sys.exit(1) | ||
|
||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,10 +14,10 @@ | |
try: | ||
# Try the original SDK library name | ||
import isi_sdk | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same comment here. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same situation here with allowing either |
||
except ImportError as err: | ||
print('Unable to import isi_sdk_7_2. Please install the Isilon SDK.') | ||
except ImportError: | ||
print('Unable to import isi_sdk_7_2. Please install the Isilon SDK:') | ||
print('pip install isi_sdk_7_2') | ||
print('See https://github.com/isilon') | ||
print(err) | ||
sys.exit(1) | ||
|
||
PRIMARY = 0 | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
// Smoke tests for Isilon Stat Browser | ||
// | ||
// Loads index.html into a phantomjs browser | ||
// verify page title is set | ||
// verify title text is displayed | ||
// verify search box is displayed | ||
// Verfiy reset button is displayed | ||
// verify tags button is displayed | ||
// verify top-level categories are visible | ||
// verify category sub-contents are not visible | ||
// verify individual keys are not visible | ||
|
||
/* | ||
To run the tests: | ||
casperjs test web_app/js/tests/smoke.js | ||
*/ | ||
|
||
casper.test.begin('Smoke Test', 8, function suite(test) { | ||
casper.start('web_app/index.html', function() { | ||
test.assertTitle('EMC | Isilon OneFS Statistics', 'page title is set') | ||
test.assertSelectorHasText('h1.col-md-12', 'EMC | Isilon OneFS Statistics', 'title text is displayed'); | ||
test.assertVisible('#text_filter', 'search box is displayed') | ||
test.assertVisible('#resetButton', 'reset button is displayed') | ||
test.assertVisible('#tagDropdown', 'tags dropdown is displayed') | ||
test.assertVisible('div.category_main', 'top-level categories are visible') | ||
test.assertNotVisible('div.subcontents', 'category sub-contents are not visible') | ||
test.assertNotVisible('div.key_main', 'individual keys are not visible') | ||
|
||
}).run(function() { | ||
test.done(); | ||
}); | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider referencing
requirements.txt
instead of duplicating it here.