Ejemplo n.º 1
0
    def setUp(self):
        user = User.objects.create_user(email='*****@*****.**', password='******')
        pool = Pool(name='_Foo', user=user)
        pool.save()

        library = Library.get_test_library('Library')
        library.save()
        pool.libraries.add(library)
Ejemplo n.º 2
0
    def setUp(self):
        user = User.objects.create_user(email='*****@*****.**', password='******')
        pool = Pool(name='_Foo', user=user)
        pool.save()

        library = Library.get_test_library('Library')
        library.save()
        pool.libraries.add(library)
Ejemplo n.º 3
0
    def setUp(self):
        user = User.objects.create_user(email='*****@*****.**', password='******')
        user.save()

        self.request = Request(user=user)
        self.request.save()

        self.library = Library.get_test_library('Library')
        self.sample = Sample.get_test_sample('Sample')
        self.library.save()
        self.sample.save()
Ejemplo n.º 4
0
    def setUp(self):
        user = User.objects.create_user(email='*****@*****.**', password='******')
        user.save()

        self.request = Request(user=user)
        self.request.save()

        self.library = Library.get_test_library('Library')
        self.sample = Sample.get_test_sample('Sample')
        self.library.save()
        self.sample.save()
Ejemplo n.º 5
0
    def setUp(self):
        user = User.objects.create_user(email='*****@*****.**', password='******')
        pool = Pool(name='_Foo', user=user)
        pool.save()

        library_1 = Library.get_test_library('Library1')
        library_2 = Library.get_test_library('Library2')
        library_1.save()
        library_2.save()

        sample_1 = Sample.get_test_sample('Sample1')
        sample_2 = Sample.get_test_sample('Sample2')
        sample_1.save()
        sample_2.save()

        pool.libraries.add(library_1)
        pool.samples.add(sample_1)

        self.request = Request(user=user)
        self.request.save()
        self.request.libraries.add(*[library_1, library_2])
        self.request.samples.add(*[sample_1, sample_2])
Ejemplo n.º 6
0
    def setUp(self):
        user = User.objects.create_user(email='*****@*****.**', password='******')
        pool = Pool(name='_Foo', user=user)
        pool.save()

        library_1 = Library.get_test_library('Library1')
        library_2 = Library.get_test_library('Library2')
        library_1.save()
        library_2.save()

        sample_1 = Sample.get_test_sample('Sample1')
        sample_2 = Sample.get_test_sample('Sample2')
        sample_1.save()
        sample_2.save()

        pool.libraries.add(library_1)
        pool.samples.add(sample_1)

        self.request = Request(user=user)
        self.request.save()
        self.request.libraries.add(*[library_1, library_2])
        self.request.samples.add(*[sample_1, sample_2])
Ejemplo n.º 7
0
    def test_get_all_empty(self):
        self.client.login(email='*****@*****.**', password='******')

        library = Library.get_test_library('Library2')
        library.save()

        sample = Sample.get_test_sample('Sample2')
        sample.save()

        self.request.libraries.add(library)
        self.request.samples.add(sample)

        response = self.client.get(reverse('library.get_all'),
                                   {'quality_check': 'true'})
        self.assertEqual(response.status_code, 200)
        self.assertEqual(response.content, b'[]')
Ejemplo n.º 8
0
    def test_get_all_empty(self):
        self.client.login(email='*****@*****.**', password='******')

        library = Library.get_test_library('Library2')
        library.save()

        sample = Sample.get_test_sample('Sample2')
        sample.save()

        self.request.libraries.add(library)
        self.request.samples.add(sample)

        response = self.client.get(reverse('library.get_all'), {
            'quality_check': 'true'
        })
        self.assertEqual(response.status_code, 200)
        self.assertEqual(response.content, b'[]')
Ejemplo n.º 9
0
 def setUp(self):
     self.library = Library.get_test_library('Library')
     self.pooling = Pooling(library=self.library)