-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #82 from uw-it-aca/qa
Qa to master for textbook card release
- Loading branch information
Showing
26 changed files
with
443 additions
and
169 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
42 changes: 42 additions & 0 deletions
42
...urces/book/file/myuw/myuw_mobile_beta.ubs_quarter_winter_sln1_13449_sln2_13458_sln3_13464
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
{ | ||
"13449": [{ | ||
"isbn":"9781256396362", | ||
"title":"Writ of BC", | ||
"authors": [{"name":"Mcdermott"}], | ||
"price":58.00, | ||
"used_price":null, | ||
"required":true, | ||
"notes":"required", | ||
"cover_image": null | ||
}, | ||
{ | ||
"isbn":"9780521600491", | ||
"title":"History Of EMBA", | ||
"authors":[{"name":"Trigger" }], | ||
"price":45.00, | ||
"used_price":null, | ||
"required":false, | ||
"notes":"this is optional", | ||
"cover_image":null | ||
}], | ||
"13458": [{ | ||
"isbn":"9781256496062", | ||
"title":"ESS Stuff 'n Things", | ||
"authors": [{"name":"Mcdermott"}], | ||
"price":58.00, | ||
"used_price":null, | ||
"required":true, | ||
"notes":null, | ||
"cover_image": null | ||
}], | ||
"13464": [{ | ||
"isbn":"9785256396062", | ||
"title":"Studies in Bissy Bee", | ||
"authors": [{"name":"Mcdermott"}], | ||
"price":58.00, | ||
"used_price":null, | ||
"required":false, | ||
"notes":null, | ||
"cover_image": null | ||
}] | ||
} |
1 change: 1 addition & 0 deletions
1
myuw_mobile/resources/sws/file/student/v5/term/2012_winter.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"ATermLastDay":null,"AcademicCatalog":"2010-08-01","BTermFirstDay":null,"CensusDay":"2012-01-13","FifthDay":"2012-01-06","FinancialAidYear":null,"FirstDay":"2012-01-03","FirstDayMedSchool":null,"GradeSubmissionDeadline":"2012-03-20T17:00:00","GradingPeriodClose":"2012-04-04T17:00:00","GradingPeriodOpen":"2012-02-27T08:00:00","GradingPeriodOpenATerm":null,"LastAddDay":"2012-01-23","LastAddDayATerm":null,"LastAddDayBTerm":null,"LastDayOfClasses":"2012-03-09","LastDropDay":"2012-02-20","LastDropDayATerm":null,"LastDropDayBTerm":null,"LastDropDayNotRecorded":"2012-01-15","LastDropDayNotRecordedATerm":null,"LastDropDayNotRecordedBTerm":null,"LastFinalExamDay":"2012-03-16","NextTerm":{"Href":"\/student\/v5\/term\/2012,spring.json","Quarter":"spring","Year":2012},"PreviousTerm":{"Href":"\/student\/v5\/term\/2011,autumn.json","Quarter":"autumn","Year":2011},"Quarter":"winter","RegistrationPeriods":[{"EndDate":"2011-11-27","StartDate":"2011-11-04"},{"EndDate":"2012-01-02","StartDate":"2011-11-28"},{"EndDate":"2012-01-09","StartDate":"2012-01-03"}],"RegistrationServicesStart":"2011-10-28","StudentAccountStart":null,"TimeScheduleConstruction":{"Bothell":false,"Seattle":false,"Tacoma":false},"TimeSchedulePublished":{"Bothell":true,"Seattle":true,"Tacoma":true},"Year":2012} |
1 change: 1 addition & 0 deletions
1
myuw_mobile/resources/sws/file/student/v5/term/2014_summer.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"ATermLastDay":"2014-07-23","AcademicCatalog":"2010-08-01","BTermFirstDay":"2014-07-24","CensusDay":"2014-07-03","FifthDay":"2014-06-27","FinancialAidYear":null,"FirstDay":"2014-06-23","FirstDayMedSchool":null,"GradeSubmissionDeadline":"2014-08-26T17:00:00","GradingPeriodClose":"2014-09-10T17:00:00","GradingPeriodOpen":"2014-08-15T08:00:00","GradingPeriodOpenATerm":"2014-07-17T08:00:00","LastAddDay":"2014-07-13","LastAddDayATerm":"2014-07-13","LastAddDayBTerm":"2014-07-30","LastDayOfClasses":"2014-08-22","LastDropDay":"2014-08-10","LastDropDayATerm":"2014-07-13","LastDropDayBTerm":"2014-08-13","LastDropDayNotRecorded":"2014-07-06","LastDropDayNotRecordedATerm":"2014-06-29","LastDropDayNotRecordedBTerm":"2014-07-30","LastFinalExamDay":"2014-08-22","NextTerm":{"Href":"\/student\/v5\/term\/2014,autumn.json","Quarter":"autumn","Year":2014},"PreviousTerm":{"Href":"\/student\/v5\/term\/2014,spring.json","Quarter":"spring","Year":2014},"Quarter":"summer","RegistrationPeriods":[{"EndDate":"2014-05-21","StartDate":"2014-04-14"},{"EndDate":"2014-06-22","StartDate":"2014-05-22"},{"EndDate":"2014-06-29","StartDate":"2014-06-23"}],"RegistrationServicesStart":"2014-04-07","StudentAccountStart":null,"TimeScheduleConstruction":{"Bothell":false,"Seattle":false,"Tacoma":false},"TimeSchedulePublished":{"Bothell":true,"Seattle":true,"Tacoma":true},"Year":2014} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
from django.test import TestCase | ||
from django.test.client import Client | ||
from django.core.urlresolvers import reverse | ||
from unittest2 import skipIf | ||
from myuw_mobile.test.api import missing_url, get_user, get_user_pass | ||
from django.test.utils import override_settings | ||
import json | ||
|
||
@override_settings(RESTCLIENTS_SWS_DAO_CLASS='restclients.dao_implementation.sws.File', | ||
MIDDLEWARE_CLASSES = ( | ||
'django.contrib.sessions.middleware.SessionMiddleware', | ||
'django.middleware.common.CommonMiddleware', | ||
'django.middleware.csrf.CsrfViewMiddleware', | ||
'django.contrib.auth.middleware.AuthenticationMiddleware', | ||
'django.contrib.auth.middleware.RemoteUserMiddleware', | ||
'django.contrib.messages.middleware.MessageMiddleware', | ||
'django.middleware.clickjacking.XFrameOptionsMiddleware', | ||
'userservice.user.UserServiceMiddleware', | ||
), | ||
AUTHENTICATION_BACKENDS = ('django.contrib.auth.backends.ModelBackend',) | ||
) | ||
class TestCurBooks(TestCase): | ||
def setUp(self): | ||
self.client = Client() | ||
|
||
@skipIf(missing_url("myuw_current_book"), "myuw_current_book url not configured") | ||
def test_javerage_cur_term_books(self): | ||
url = reverse("myuw_current_book") | ||
get_user('javerage') | ||
self.client.login(username='javerage', password=get_user_pass('javerage')) | ||
response = self.client.get(url) | ||
self.assertEquals(response.status_code, 200) | ||
|
||
data = json.loads(response.content) | ||
|
||
self.assertEquals(len(data["18545"]), 2) | ||
self.assertEquals(data["verba_link"], "http://uw-seattle.verbacompare.com/m?section_id=AB12345&quarter=spring") | ||
self.assertEquals(data["18545"][0]["cover_image_url"], "www7.bookstore.washington.edu/MyUWImage.taf?isbn=9780878935970&key=46c9ef715edb2ec69517e2c8e6ec9c18") | ||
self.assertEquals(len(data["18545"][0]["authors"]), 1) | ||
self.assertEquals(data["18545"][0]["is_required"], True) | ||
self.assertEquals(data["18545"][0]["price"], None) | ||
self.assertEquals(data["18545"][0]["used_price"], None) | ||
self.assertEquals(data["18545"][0]["isbn"], '9780878935970') | ||
self.assertEquals(data["18545"][0]["notes"], 'required') | ||
|
||
@skipIf(missing_url("myuw_current_book"), "myuw_current_book url not configured") | ||
def test_eight_cur_term_books(self): | ||
url = reverse("myuw_current_book") | ||
get_user('eight') | ||
self.client.login(username='eight', password=get_user_pass('eight')) | ||
response = self.client.get(url) | ||
self.assertEquals(response.status_code, 200) | ||
|
||
data = json.loads(response.content) | ||
|
||
self.assertEquals(len(data["11646"]), 1) | ||
self.assertEquals(data["11646"][0]["cover_image_url"], None) | ||
self.assertEquals(len(data["11646"][0]["authors"]), 1) | ||
self.assertEquals(data["11646"][0]["is_required"], True) | ||
self.assertEquals(data["11646"][0]["price"], 45.0) | ||
self.assertEquals(data["11646"][0]["used_price"], None) | ||
self.assertEquals(data["11646"][0]["isbn"], "9780521600491") | ||
self.assertEquals(data["11646"][0]["notes"], 'required') | ||
|
Oops, something went wrong.