Esempio n. 1
0
 def test_files(self):
     with app.app_context():
         t = get_tree("files")
         self.assertTrue(
             len([x.get('id') for x in t
                  if x.get('id') == 'test_utils.py']) == 1)
         t = get_tree("files/folder")
         self.assertTrue(
             len([x.get('id') for x in t if x.get('id') == '1']) == 1)
Esempio n. 2
0
 def test_tree(self):
     with app.app_context():
         t = get_tree()
         self.assertTrue(len(t) > 0)
         self.assertTrue('git' not in (x['id'] for x in t))
         t = get_tree("tags")
         self.assertEqual(t, [])
         t = get_tree("local-branches")
         self.assertEqual(t, [])
         t = get_tree("remote-branches")
         self.assertEqual(t, [])
         t = get_tree("files")
         self.assertTrue(
             len([x.get('id') for x in t
                  if x.get('id') == 'test_utils.py']) == 1)
         t = get_tree("files/folder")
         self.assertTrue(
             len([x.get('id') for x in t if x.get('id') == '1']) == 1)
Esempio n. 3
0
 def test_tree(self):
     with app.app_context():
         t = get_tree()
         self.assertTrue(len(t) > 0)
         self.assertTrue('workspace' in (x['id'] for x in t))
         t = get_tree("tags")
         self.assertIsNotNone(t)
         t = get_tree("local-branches")
         self.assertIsNotNone(t)
         t = get_tree("remote-branches")
         self.assertIsNotNone(t)
         t = get_tree("files")
         self.assertTrue(
             len([x.get('id') for x in t
                  if x.get('id') == 'test_utils.py']) == 1)
         t = get_tree("files/folder")
         self.assertTrue(
             len([x.get('id') for x in t if x.get('id') == '1']) == 1)
Esempio n. 4
0
 def test_git(self):
     with app.app_context():
         t = get_tree("git/HEAD")
         self.assertTrue(t is not None)
Esempio n. 5
0
 def test_remote_branches(self):
     with app.app_context():
         t = get_tree("remote-branches")
         self.assertIsNotNone(t)
Esempio n. 6
0
 def test_local_branches(self):
     with app.app_context():
         t = get_tree("local-branches")
         self.assertIsNotNone(t)
Esempio n. 7
0
 def test_tags(self):
     with app.app_context():
         t = get_tree("tags")
         self.assertIsNotNone(t)
Esempio n. 8
0
 def test_tree(self):
     with app.app_context():
         t = get_tree()
         self.assertTrue(len(t) > 0)
         self.assertTrue('git' in (x['id'] for x in t))
 def _tree(self, path, args={}):
     return {'value': get_tree(path, args)}
 def _tree(self, path):
     return {'value': get_tree(path)}