You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

31 lines
728 B

from body_create import rrule_former, create_body
import datetime
def json_dump(*args):
pass
def test_rrule():
# test
now = datetime.datetime.now()
from munch import Munch
test_obj = Munch(
days=[1, 3, 5],
time_range=[now.time(), (now + datetime.timedelta(seconds=50 * 60)).time()],
date_range=[now.date(), (now + datetime.timedelta(days=20)).date()],
)
test_result = rrule_former(test_obj)
return locals()
def testclass_obj2body():
with open("classes.pkl", "rb") as file:
classes = pickle.load(file)
test_result = list(filter(bool, map(create_body, classes)))
return test_result
if __name__ == "__main__":
json_dump(testclass_obj2body())