File tree Expand file tree Collapse file tree 3 files changed +9
-3
lines changed Expand file tree Collapse file tree 3 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -112,6 +112,7 @@ venv/
112
112
ENV /
113
113
env.bak /
114
114
venv.bak /
115
+ Pipfile
115
116
116
117
# Spyder project settings
117
118
.spyderproject
Original file line number Diff line number Diff line change 1
1
import requests
2
- from models import APIException , Book
2
+
3
+ from .models import APIException , Book
3
4
4
5
5
6
class GutenbergAPI :
@@ -11,7 +12,7 @@ class GutenbergAPI:
11
12
# lots of money and response times will be much faster for you.
12
13
# The instructions for self-hosting can be found here:
13
14
# https://github.com/garethbjohnson/gutendex/wiki/Installation-Guide
14
- def __init__ (self , instance_url = "https://gutendex.com " ):
15
+ def __init__ (self , instance_url = "https://gutendex.devbranch.co " ):
15
16
self .instance_url = instance_url
16
17
17
18
# Methods for getting or searching for lists of books
Original file line number Diff line number Diff line change 1
1
import unittest
2
2
3
- from gutenberg . gutenberg import GutenbergAPI
3
+ from gutenberg import GutenbergAPI
4
4
5
5
6
6
class TestSimple (unittest .TestCase ):
7
7
def test_alwaystrue (self ):
8
8
self .assertEqual (1 , 1 )
9
9
10
+ def test_instance_is_default (self ):
11
+ gb = GutenbergAPI ()
12
+ self .assertEqual (gb .instance_url , "https://gutendex.devbranch.co" )
13
+
10
14
11
15
if __name__ == "__main__" :
12
16
unittest .main ()
You can’t perform that action at this time.
0 commit comments