def test_handles_ubuntu_percise(self):
        def fake_distro():
            return ('Ubuntu', '12.04', 'precise')

        distro, release, codename = platform_information(fake_distro)
        assert distro == 'Ubuntu'
        assert release == '12.04'
        assert codename == 'precise'
    def test_hanles_centos_64(self):
        def fake_distro():
            return ('CentOS', '6.4', 'Final')

        distro, release, codename = platform_information(fake_distro)
        assert distro == 'CentOS'
        assert release == '6.4'
        assert codename == 'Final'
    def test_handles_no_codename(self):
        def fake_distro():
            return ('SlaOS', '99.999', '')

        distro, release, codename = platform_information(fake_distro)
        assert distro == 'SlaOS'
        assert release == '99.999'
        assert codename == ''
    def test_handles_deb_version_slash_sid(self):
        def fake_distro():
            return ('debian', 'jessie/sid', '')

        distro, release, codename = platform_information(fake_distro)
        assert distro == 'debian'
        assert release == 'jessie/sid'
        assert codename == 'sid'
    def test_handles_deb_version_slash(self):
        def fake_distro():
            return ('debian', 'wheezy/something', '')

        distro, release, codename = platform_information(fake_distro)
        assert distro == 'debian'
        assert release == 'wheezy/something'
        assert codename == 'wheezy'
Exemple #6
0
 def test_handles_ubuntu_percise(self):
     def fake_distro(): return ('Ubuntu', '12.04', 'precise')
     distro, release, codename = platform_information(fake_distro)
     assert distro == 'Ubuntu'
     assert release == '12.04'
     assert codename == 'precise'
Exemple #7
0
 def test_hanles_centos_64(self):
     def fake_distro(): return ('CentOS', '6.4', 'Final')
     distro, release, codename = platform_information(fake_distro)
     assert distro == 'CentOS'
     assert release == '6.4'
     assert codename == 'Final'
Exemple #8
0
 def test_handles_no_codename(self):
     def fake_distro(): return ('SlaOS', '99.999', '')
     distro, release, codename = platform_information(fake_distro)
     assert distro == 'SlaOS'
     assert release == '99.999'
     assert codename == ''
Exemple #9
0
 def test_handles_deb_version_slash_sid(self):
     def fake_distro(): return ('debian', 'jessie/sid', '')
     distro, release, codename = platform_information(fake_distro)
     assert distro == 'debian'
     assert release == 'jessie/sid'
     assert codename == 'sid'
Exemple #10
0
 def test_handles_deb_version_slash(self):
     def fake_distro(): return ('debian', 'wheezy/something', '')
     distro, release, codename = platform_information(fake_distro)
     assert distro == 'debian'
     assert release == 'wheezy/something'
     assert codename == 'wheezy'