示例#1
0
def construct_query(id, time):
    return '{},{},0,0,{},0,0,0,0,0,{}\r'.format(
        id,
        get_active_user_count(time),
        get_projects(time),
        time.strftime('%Y-%m-%d %H:%M:%S.%f')
    )
示例#2
0
def construct_query(id, time):
    return '{},{},0,0,{},0,0,0,0,0,{}\r'.format(
        id,
        get_active_user_count(time),
        get_projects(time),
        time.strftime('%Y-%m-%d %H:%M:%S.%f')
    )
示例#3
0
 def test_date_created_filter_returns_no_results(self):
     time = self.public_node.date_created - timedelta(weeks=1)
     count = get_projects(time=time)
     nt.assert_equal(count, 0)
示例#4
0
 def test_get_registrations(self):
     count = get_projects(registered=True)
     nt.assert_equal(count, 1)
示例#5
0
 def test_get_public_top_level_nodes(self):
     count = get_projects(public=True)
     nt.assert_equal(count, 1)
示例#6
0
 def test_get_all_top_level_nodes(self):
     count = get_projects()
     nt.assert_equal(count, 4)
示例#7
0
 def setUp(self):
     super(TestMetricsGetDaysStatistics, self).setUp()
     Node.remove()
     NodeFactory(category='project')  # makes 2 nodes
     NodeFactory(category='data')  # probably makes 1 data 1 project?
     print get_projects()
示例#8
0
 def test_time(self):
     time = self.node.date_created - timedelta(seconds=1)
     count = get_projects(time=time)
     nt.assert_equal(count, 0)
示例#9
0
 def setUp(self):
     super(TestMetricsGetDaysStatistics, self).setUp()
     Node.remove()
     NodeFactory(category="project")  # makes 2 nodes
     NodeFactory(category="data")  # probably makes 1 data 1 project?
     print get_projects()
示例#10
0
 def test_time(self):
     time = self.node.date_created - timedelta(seconds=1)
     count = get_projects(time=time)
     nt.assert_equal(count, 0)