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') )
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)
def test_get_registrations(self): count = get_projects(registered=True) nt.assert_equal(count, 1)
def test_get_public_top_level_nodes(self): count = get_projects(public=True) nt.assert_equal(count, 1)
def test_get_all_top_level_nodes(self): count = get_projects() nt.assert_equal(count, 4)
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()
def test_time(self): time = self.node.date_created - timedelta(seconds=1) count = get_projects(time=time) nt.assert_equal(count, 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()