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
with nested( | |
patch( | |
'chevah.server.commons.commands.copyfile', | |
), | |
patch( | |
'chevah.server.commons.commands.generate_ssh_key', | |
return_value=(0, 'message'), | |
), | |
patch.object( | |
local_filesystem, |
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
# | |
# Define remote system config as a pillar | |
# | |
gateway: | |
host: hostname | |
port: 22 | |
protocol: ssh | telnet # uses scp/ssh or rcp/rsh | |
ssh_key: "/path/on/local/minion" | |
server_fingerpring: '34:32:a4:32:32:32:a4:32:a4' |
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
class TestDatabaseHandlerSQLite(ServerTestCase): | |
""" | |
Integration tests for the SQLite database log handler. | |
""" | |
def setUp(self): | |
super(TestDatabaseHandlerSQLite, self).setUp() | |
self.pool = DBConnectionPool('sqlite://:memory:') | |
self.handler = DatabaseHandler(self.pool, capacity=1) | |
self.handler._scheduler = Clock() |
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
[user] | |
name = Adi Roiban | |
email = [email protected] | |
[alias] | |
ae = !"~/.local/opt/Sublime\\ Text\\ 2/sublime_text" ~/.gitconfig | |
st = status -s | |
ci = commit -a | |
cis = commit | |
push = push --tags |
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
def __init__(self, url, pool_size_min=3, pool_size_max=8): | |
self._url = url | |
self._db_config = DBConfiguration(url) | |
self._pool = ConnectionPool( | |
self._db_config.driver_name, | |
cp_min=pool_size_min, | |
cp_max=pool_size_max, | |
**self._db_config.driver_arguments, | |
) |
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
class IDBEventEntry(IDBTable): | |
message_id = schema.db.Integer(name='event_id', description='Some docstring here', lenght=12) | |
class DBObject(TwistarDBObject): | |
def getColums(): | |
""" | |
Return all db columns. | |
""" |
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
def _exit(self, exit_code=0): | |
""" | |
Helper method for testing. | |
Use os._exit() to avoid re-raising SystemExit error. | |
When reactor is running add a hook to be called after reactor stop. | |
This is mocked in tests since we can not addSystemEventTrigger | |
multiple times for the same reactor. |
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
try: | |
from chevah import altceva | |
altceva | |
except ImportError: | |
altceva = None | |
altceva |
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
(1375-win-envir~)$ paver lint | |
---> brink.pavement_commons.lint | |
./make-windows-environment.js | |
21: E:0131: Single-quoted string preferred over double-quoted string. | |
23: E:0131: Single-quoted string preferred over double-quoted string. | |
23: E:0131: Single-quoted string preferred over double-quoted string. | |
37: E:0131: Single-quoted string preferred over double-quoted string. | |
40: E:0131: Single-quoted string preferred over double-quoted string. | |
48: E:0131: Single-quoted string preferred over double-quoted string. | |
61: E:0013: No semicolon is required to end a code block |
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
deferrer_connection = doConnection() | |
deferred_connection.addCallback(lambda result: getSchemaDeferred()) | |
deferrer_connection.addCallback(cbStartFlushing) | |
deferrer_connection.addErrback(ebDisableLogger) | |
deferrer_connection.addErrback(ebConvertUnknownErrors) |
OlderNewer