Exemple #1
0
 def __init__(self, **kwargs):
     """Initialize a new blog post"""
     defaults = {
         'title': kwargs.get('title'),
         'subtitle': kwargs.get('subtitle'),
         'body': kwargs.get('body'),
         'post_time': kwargs.get('post_time', time()),
         'username': kwargs.get('username')
     }
     Base.__init__(self, **defaults)
Exemple #2
0
    def __init__(self, **kwargs):
        # Initialize some default values
        defaults = {
            'appeared': '',
            'difficulty': 0,
            'added': time.time()
        }
        # Override defaults if provided
        defaults.update(kwargs)

        Base.__init__(self, **defaults)
Exemple #3
0
 def __init__(self, **kwargs):
     Base.__init__(self, **kwargs)
     # The MockSubmission will also mock relevant data about the problem.
     self.time_limit = MOCK_PROBLEM_TIMEOUT
     if not self.job:
         self.job = "mocksubmit"
Exemple #4
0
 def __init__(self, *args, **kwargs):
     Base.__init__(self, **kwargs)
Exemple #5
0
 def __init__(self, **kwargs):
     # Initialize default value(s)
     defaults = {'time_limit': 90}
     # Override defaults if provided
     defaults.update(kwargs)
     Base.__init__(self, **defaults)