Esempio n. 1
0
    def test_box_addon_folder_if_folder_is_none(self):
        # Something is returned on normal circumstances
        root = box_addon_folder(node_settings=self.node_settings, auth=self.user.auth)
        assert_true(root)

        # The root object is returned w/ None folder
        self.node_settings.folder_name = None
        self.node_settings.save()
        root = box_addon_folder(node_settings=self.node_settings, auth=self.user.auth)
        assert_true(root)
Esempio n. 2
0
    def test_box_addon_folder_if_folder_is_none(self):
        # Something is returned on normal circumstances
        root = box_addon_folder(node_settings=self.node_settings,
                                auth=self.user.auth)
        assert_true(root)

        # The root object is returned w/ None folder
        self.node_settings.folder_name = None
        self.node_settings.save()
        root = box_addon_folder(node_settings=self.node_settings,
                                auth=self.user.auth)
        assert_true(root)
Esempio n. 3
0
 def test_returns_none_unconfigured(self):
     self.node_settings.folder_id = None
     assert_is(utils.box_addon_folder(
         self.node_settings, Auth(self.user)), None)
Esempio n. 4
0
    def test_works(self):
        folder = utils.box_addon_folder(
            self.node_settings, Auth(self.user))

        assert_true(isinstance(folder, list))
        assert_true(isinstance(folder[0], dict))
Esempio n. 5
0
 def test_returns_none_unconfigured(self):
     self.node_settings.folder_id = None
     assert_is(utils.box_addon_folder(self.node_settings, Auth(self.user)),
               None)
Esempio n. 6
0
    def test_works(self):
        folder = utils.box_addon_folder(self.node_settings, Auth(self.user))

        assert_true(isinstance(folder, list))
        assert_true(isinstance(folder[0], dict))