~fginther/helipad/add-missing-coverage-data-file

« back to all changes in this revision

Viewing changes to tests/integration/test_django_jenkins_build.py

  • Committer: Allan LeSage
  • Date: 2013-07-12 20:16:27 UTC
  • Revision ID: allan.lesage@canonical.com-20130712201627-gpj2twk154g7lwpn
Initial commit, trunk r118.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
from unittest import skip
 
2
from django.test import TestCase
 
3
from ci.models import JenkinsBuild, JenkinsJob
 
4
 
 
5
 
 
6
class TestCoverageReport(TestCase):
 
7
    fixtures = ['phablet-apps.json']
 
8
 
 
9
    @skip
 
10
    def test_should_exist(self):
 
11
        """Make sure we've got one if it's there :) ."""
 
12
 
 
13
        jenkins_job = JenkinsJob.objects.get(
 
14
            name="phone-app-quantal-i386-autolanding")
 
15
        jenkins_build = JenkinsBuild.objects.get(
 
16
            jenkins_job=jenkins_job,
 
17
            number=31)
 
18
        self.assertIsNotNone(jenkins_build.coverage_report)
 
19
 
 
20
 
 
21
    @skip
 
22
    def test_shouldnt_exist(self):
 
23
        """'Primary' jobs shouldn't have coverage reports."""
 
24
 
 
25
        jenkins_job = JenkinsJob.objects.get(
 
26
            name="phone-app-autolanding")
 
27
        jenkins_build = JenkinsBuild.objects.get(
 
28
            jenkins_job=jenkins_job,
 
29
            number=31)
 
30
        self.assertIsNone(jenkins_build.coverage_report)
 
31