Exemple #1
0
 def test_group_can_upload_to_owned(self):
     group = Group.objects.create(name='group')
     member = User.objects.create(username="******")
     group.user_set.add(member)
     other = User.objects.create(username="******")
     bundle_stream = fixtures.create_bundle_stream("/public/team/group/basic/")
     self.assertTrue(bundle_stream.can_upload(member))
     self.assertFalse(bundle_stream.can_upload(other))
Exemple #2
0
 def test_can_upload_to_other_stream(self):
     bundle_stream = fixtures.create_bundle_stream(
         "/public/personal/owner/")
     user = User.objects.create(username='******')
     self.assertFalse(bundle_stream.can_upload(user))
Exemple #3
0
 def test_can_upload_to_owned_stream(self):
     bundle_stream = fixtures.create_bundle_stream(
         "/public/personal/owner/")
     user = User.objects.get(username='******')
     self.assertTrue(bundle_stream.can_upload(user))
Exemple #4
0
 def test_can_upload_to_anonymous(self):
     user = User.objects.create(username='******')
     bundle_stream = fixtures.create_bundle_stream("/anonymous/")
     self.assertTrue(bundle_stream.can_upload(user))
 def test_can_upload_to_other_stream(self):
     bundle_stream = fixtures.create_bundle_stream("/public/personal/owner/")
     user = User.objects.create(username='******')
     self.assertFalse(bundle_stream.can_upload(user))
     user.delete()
 def test_can_upload_to_anonymous(self):
     user = User.objects.create(username='******')
     bundle_stream = fixtures.create_bundle_stream("/anonymous/")
     self.assertTrue(bundle_stream.can_upload(user))
 def test_can_upload_to_owned_stream(self):
     bundle_stream = fixtures.create_bundle_stream("/public/personal/owner/")
     user = User.objects.get(username='******')
     self.assertTrue(bundle_stream.can_upload(user))
Exemple #8
0
 def setUp(self):
     super(DashboardAPIPutTests, self).setUp()
     self.bundle_stream = fixtures.create_bundle_stream(self.pathname)
     self.bundle = None
 def setUp(self):
     super(TestRunListViewAnonymousTest, self).setUp()
     self.bundle_stream = fixtures.create_bundle_stream(self.pathname)
     self.user = None
     self.url = reverse("dashboard_app.views.test_run_list",
                        args=[self.bundle_stream.pathname])
 def setUp(self):
     super(TestRunListViewAnonymousTest, self).setUp()
     self.bundle_stream = fixtures.create_bundle_stream(self.pathname)
     self.user = None
     self.url = reverse("lava_dashboard_test_run_list", args=[self.bundle_stream.pathname])
Exemple #11
0
 def setUp(self):
     super(LP658917, self).setUp()
     self.bundle_stream = fixtures.create_bundle_stream("/anonymous/")
     self.dashboard_api = DashboardAPI()
     self.content_sha1 = None
Exemple #12
0
 def setUp(self):
     super(LP658917, self).setUp()
     self.bundle_stream = fixtures.create_bundle_stream("/anonymous/")
     self.dashboard_api = DashboardAPI()
     self.content_sha1 = None