Skip to content
This repository was archived by the owner on Nov 12, 2025. It is now read-only.

Commit 2085f46

Browse files
committed
Seems windows is more agressive with file locks than macOS so unable to continue to use this hack
1 parent df922b6 commit 2085f46

5 files changed

Lines changed: 52 additions & 52 deletions

File tree

assets/integration_test/quote_plus.py

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,17 @@
66
import json
77

88
'''Simple usage of the signed key API endpoints.'''
9-
publickey = "APIK-gZq0naQTvkO2ThCJPhVW1VAKSfX"
10-
privatekey = "G8B6iCC7YxKGl8yEnSZ7SZZYDVMUCmxe"
9+
publickey = "APIK-K1KBVOlbTDElXVMa86sn5zHnsyF"
10+
privatekey = "RmpGihBgvJx9pT2cYk7Q0RbeFeSKlQ8f"
1111

1212
# Connect to mysql and add our keys
1313
# http://pythoncentral.io/introduction-to-sqlite-in-python/
14-
db = sqlite3.connect('searchcode.sqlite')
15-
cursor = db.cursor()
16-
cursor.execute("DELETE FROM api WHERE publickey = '%s'" % (publickey))
17-
db.commit()
18-
cursor.execute('INSERT INTO api (publickey,privatekey,lastused,data) VALUES (?,?,?,?)', (publickey, privatekey, '', ''))
19-
db.commit()
14+
# db = sqlite3.connect('searchcode.sqlite')
15+
# cursor = db.cursor()
16+
# cursor.execute("DELETE FROM api WHERE publickey = '%s'" % (publickey))
17+
# db.commit()
18+
# cursor.execute('INSERT INTO api (publickey,privatekey,lastused,data) VALUES (?,?,?,?)', (publickey, privatekey, '', ''))
19+
# db.commit()
2020

2121

2222
reponame = ' test'
@@ -52,6 +52,6 @@
5252
assert parsed['message'] == 'added repository successfully', parsed['message']
5353

5454

55-
cursor.execute("DELETE FROM api WHERE publickey = '%s'" % (publickey))
56-
cursor.execute("DELETE FROM repo")
57-
db.commit()
55+
# cursor.execute("DELETE FROM api WHERE publickey = '%s'" % (publickey))
56+
# cursor.execute("DELETE FROM repo")
57+
# db.commit()

assets/integration_test/signed_fuzz.py

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,17 @@
77
import sqlite3
88

99
'''Simple usage of the signed key API endpoints.'''
10-
publickey = "APIK-gZq0naQTvkO2ThCJPhVW1VAKSfX"
11-
privatekey = "G8B6iCC7YxKGl8yEnSZ7SZZYDVMUCmxe"
10+
publickey = "APIK-K1KBVOlbTDElXVMa86sn5zHnsyF"
11+
privatekey = "RmpGihBgvJx9pT2cYk7Q0RbeFeSKlQ8f"
1212

1313
# Connect to mysql and add our keys
1414
# http://pythoncentral.io/introduction-to-sqlite-in-python/
15-
db = sqlite3.connect('searchcode.sqlite')
16-
cursor = db.cursor()
17-
cursor.execute("DELETE FROM api WHERE publickey = '%s'" % (publickey))
18-
db.commit()
19-
cursor.execute('INSERT INTO api (publickey,privatekey,lastused,data) VALUES (?,?,?,?)', (publickey, privatekey, '', ''))
20-
db.commit()
15+
# db = sqlite3.connect('searchcode.sqlite')
16+
# cursor = db.cursor()
17+
# cursor.execute("DELETE FROM api WHERE publickey = '%s'" % (publickey))
18+
# db.commit()
19+
# cursor.execute('INSERT INTO api (publickey,privatekey,lastused,data) VALUES (?,?,?,?)', (publickey, privatekey, '', ''))
20+
# db.commit()
2121

2222
blns = None
2323
try:
@@ -65,6 +65,6 @@
6565
data = urllib2.urlopen(url)
6666
assert 200 == data.getcode()
6767

68-
cursor.execute("DELETE FROM api WHERE publickey = '%s'" % (publickey))
69-
cursor.execute("DELETE FROM repo")
70-
db.commit()
68+
# cursor.execute("DELETE FROM api WHERE publickey = '%s'" % (publickey))
69+
# cursor.execute("DELETE FROM repo")
70+
# db.commit()

assets/integration_test/signed_testing.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,17 @@
66
import sqlite3
77

88
'''Simple usage of the signed key API endpoints.'''
9-
publickey = "APIK-gZq0naQTvkO2ThCJPhVW1VAKSfX"
10-
privatekey = "G8B6iCC7YxKGl8yEnSZ7SZZYDVMUCmxe"
9+
publickey = "APIK-K1KBVOlbTDElXVMa86sn5zHnsyF"
10+
privatekey = "RmpGihBgvJx9pT2cYk7Q0RbeFeSKlQ8f"
1111

1212
# Connect to mysql and add our keys
1313
# http://pythoncentral.io/introduction-to-sqlite-in-python/
14-
db = sqlite3.connect('searchcode.sqlite')
15-
cursor = db.cursor()
16-
cursor.execute("DELETE FROM api WHERE publickey = '%s'" % (publickey))
17-
db.commit()
18-
cursor.execute('INSERT INTO api (publickey,privatekey,lastused,data) VALUES (?,?,?,?)', (publickey, privatekey, '', ''))
19-
db.commit()
14+
# db = sqlite3.connect('searchcode.sqlite')
15+
# cursor = db.cursor()
16+
# cursor.execute("DELETE FROM api WHERE publickey = '%s'" % (publickey))
17+
# db.commit()
18+
# cursor.execute('INSERT INTO api (publickey,privatekey,lastused,data) VALUES (?,?,?,?)', (publickey, privatekey, '', ''))
19+
# db.commit()
2020

2121

2222
reponame = "myrepo"
@@ -95,5 +95,5 @@
9595

9696
################################################################
9797

98-
cursor.execute("DELETE FROM api WHERE publickey = '%s'" % (publickey))
99-
db.commit()
98+
# cursor.execute("DELETE FROM api WHERE publickey = '%s'" % (publickey))
99+
# db.commit()

assets/integration_test/signed_testing_optional.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,17 @@
66
import sqlite3
77

88
'''Simple usage of the signed key API endpoints.'''
9-
publickey = "APIK-gZq0naQTvkO2ThCJPhVW1VAKSfX"
10-
privatekey = "G8B6iCC7YxKGl8yEnSZ7SZZYDVMUCmxe"
9+
publickey = "APIK-K1KBVOlbTDElXVMa86sn5zHnsyF"
10+
privatekey = "RmpGihBgvJx9pT2cYk7Q0RbeFeSKlQ8f"
1111

1212
# Connect to mysql and add our keys
1313
# http://pythoncentral.io/introduction-to-sqlite-in-python/
14-
db = sqlite3.connect('searchcode.sqlite')
15-
cursor = db.cursor()
16-
cursor.execute("DELETE FROM api WHERE publickey = '%s'" % (publickey))
17-
db.commit()
18-
cursor.execute('INSERT INTO api (publickey,privatekey,lastused,data) VALUES (?,?,?,?)', (publickey, privatekey, '', ''))
19-
db.commit()
14+
# db = sqlite3.connect('searchcode.sqlite')
15+
# cursor = db.cursor()
16+
# cursor.execute("DELETE FROM api WHERE publickey = '%s'" % (publickey))
17+
# db.commit()
18+
# cursor.execute('INSERT INTO api (publickey,privatekey,lastused,data) VALUES (?,?,?,?)', (publickey, privatekey, '', ''))
19+
# db.commit()
2020

2121

2222
reponame = "myrepo"
@@ -101,5 +101,5 @@
101101

102102
################################################################
103103

104-
cursor.execute("DELETE FROM api WHERE publickey = '%s'" % (publickey))
105-
db.commit()
104+
# cursor.execute("DELETE FROM api WHERE publickey = '%s'" % (publickey))
105+
# db.commit()

assets/integration_test/signed_testing_sha512.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,17 @@
66
import sqlite3
77

88
'''Simple usage of the signed key API endpoints using SHA512 hmac'''
9-
publickey = "APIK-gZq0naQTvkO2ThCJPhVW1VAKSfX"
10-
privatekey = "G8B6iCC7YxKGl8yEnSZ7SZZYDVMUCmxe"
9+
publickey = "APIK-K1KBVOlbTDElXVMa86sn5zHnsyF"
10+
privatekey = "RmpGihBgvJx9pT2cYk7Q0RbeFeSKlQ8f"
1111

1212
# Connect to mysql and add our keys
1313
# http://pythoncentral.io/introduction-to-sqlite-in-python/
14-
db = sqlite3.connect('searchcode.sqlite')
15-
cursor = db.cursor()
16-
cursor.execute("DELETE FROM api WHERE publickey = '%s'" % (publickey))
17-
db.commit()
18-
cursor.execute('INSERT INTO api (publickey,privatekey,lastused,data) VALUES (?,?,?,?)', (publickey, privatekey, '', ''))
19-
db.commit()
14+
# db = sqlite3.connect('searchcode.sqlite')
15+
# cursor = db.cursor()
16+
# cursor.execute("DELETE FROM api WHERE publickey = '%s'" % (publickey))
17+
# db.commit()
18+
# cursor.execute('INSERT INTO api (publickey,privatekey,lastused,data) VALUES (?,?,?,?)', (publickey, privatekey, '', ''))
19+
# db.commit()
2020

2121

2222
reponame = "myrepo"
@@ -95,5 +95,5 @@
9595

9696
################################################################
9797

98-
cursor.execute("DELETE FROM api WHERE publickey = '%s'" % (publickey))
99-
db.commit()
98+
# cursor.execute("DELETE FROM api WHERE publickey = '%s'" % (publickey))
99+
# db.commit()

0 commit comments

Comments
 (0)