Exemplo n.º 1
0
    def test_has_auth(self):
        settings = AddonMenbibNodeSettings(user_settings=self.user_settings)
        settings.save()
        assert_false(settings.has_auth)

        settings.user_settings.access_token = '123abc'
        settings.user_settings.save()
        assert_true(settings.has_auth)
Exemplo n.º 2
0
 def test_folder_defaults_to_none(self):
     node_settings = AddonMenbibNodeSettings(user_settings=self.user_settings)
     node_settings.save()
     assert_is_none(node_settings.folder)
Exemplo n.º 3
0
 def test_fields(self):
     node_settings = AddonMenbibNodeSettings(user_settings=self.user_settings)
     node_settings.save()
     assert_true(node_settings.user_settings)
     assert_equal(node_settings.user_settings.owner, self.user)
     assert_true(hasattr(node_settings, 'folder'))