Skip to content

Commit

Permalink
Fixes #1585: Update gitignore file and fix QuoraProfileScraperTest er…
Browse files Browse the repository at this point in the history
…ror (#1586)
  • Loading branch information
simsausaurabh authored and singhpratyush committed May 12, 2018
1 parent f277417 commit 8e9e1bb
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,10 @@ dist/loklak.jar

/docs/_build
.DS_Store

bin/org/
bin/queries/
bin/log4j2.properties
bin/api_test.sh
.sts4-cache/
.vscode/
5 changes: 3 additions & 2 deletions test/org/loklak/api/search/QuoraProfileScraperTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ public void quoraProfileScraperUserTest() {
String postsUrl = "https://www.quora.com/profile/Saptak-Sengupta/all_posts";
String questionsUrl = "https://www.quora.com/profile/Saptak-Sengupta/questions";
String postType = "user";
String post_scraper = "quora";

try {
ClientConnection connection = new ClientConnection(url);
Expand All @@ -55,10 +56,10 @@ public void quoraProfileScraperUserTest() {
System.out.println(e.getMessage());
}
JSONArray profileList = profileListTimeLine.toArray();
JSONObject quoraProfile = (JSONObject)profileList.get(0);
JSONObject quoraProfile = profileList.getJSONObject(0);

assertNotNull(quoraProfile.getString("bio"));
assertNotNull(quoraProfile.getString("works_at"));
assertEquals(post_scraper, quoraProfile.getString("post_scraper"));
assertEquals(postType, quoraProfile.getString("post_type"));
assertEquals(url, quoraProfile.getString("search_url"));
assertEquals(userName, quoraProfile.getString("user_name"));
Expand Down

0 comments on commit 8e9e1bb

Please sign in to comment.