We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a24f885 commit 7a33a48Copy full SHA for 7a33a48
1 file changed
oobt/oobt.py
@@ -0,0 +1,26 @@
1
+# Out Of Box testing
2
+#
3
+# Run simple serparpi search
4
5
+import serpapi
6
+import sys, os, pprint
7
+
8
+print("initialize serpapi client")
9
+client = serpapi.Client({
10
+ "api_key": os.getenv("API_KEY", "demo")
11
+})
12
+print("execute search")
13
+result = client.search({
14
+ "q": "coffee",
15
+ "location": "Austin,Texas",
16
+ })
17
+print("display result:")
18
+pp = pprint.PrettyPrinter(indent=2)
19
+pp.pprint(result)
20
+print("------")
21
+if len(result) > 0:
22
+ print("OK: Out of box tests passed")
23
+ sys.exit(0)
24
25
+print("FAIL: Out of box tests failed: no result")
26
+sys.exit(1)
0 commit comments