Make getTime() take arbitrary datetime object for testing purposes
This commit is contained in:
parent
4c98e587b1
commit
aea2cec4c7
1 changed files with 1 additions and 3 deletions
|
@ -36,9 +36,7 @@ def getText(db = dbtools.dbHelper()):
|
|||
def markovifyText(text):
|
||||
return Possy(text).make_short_sentence(130).replace("@", "@")
|
||||
|
||||
def getTime():
|
||||
now = datetime.datetime.now()
|
||||
|
||||
def getTime(now = datetime.datetime.now()):
|
||||
thenminute = 15 if now.minute < 15 else 30 if now.minute < 30 else 45 if now.minute < 45 else 0
|
||||
thenhour = now.hour + 1 if thenminute == 0 else now.hour
|
||||
|
||||
|
|
Loading…
Reference in a new issue