from rhcephcompose.artifacts import BinaryArtifact, SourceArtifact


class TestArtifacts(object):

    def test_binary(self):
        url = 'http://chacra.example.com/mypackage_1.0-1.deb'
        b = BinaryArtifact(url=url, checksum=None)
        assert b.filename == 'mypackage_1.0-1.deb'
        assert b.name == 'mypackage'

    def test_source(self):
        url = 'http://chacra.example.com/mypackage_1.0-1.dsc'
        b = SourceArtifact(url=url, checksum=None)
        assert b.filename == 'mypackage_1.0-1.dsc'

@@ -102,37 +102,72 @@
   de
-f test_binary(self):
+b_url = 'http://chacra.example.com/mypackage_1.0-1.deb'
 %0A    
-    
+dsc_
 url 
@@ -204,35 +204,63 @@
 ypackage_1.0-1.d
-eb'
+sc'%0A%0A    def test_binary(self):
 %0A        b = Bin
@@ -267,32 +267,41 @@
 aryArtifact(url=
+self.deb_
 url, checksum=No
@@ -424,70 +424,8 @@
 f):%0A
-        url = 'http://chacra.example.com/mypackage_1.0-1.dsc'%0A
     
@@ -451,16 +451,25 @@
 act(url=
+self.dsc_
 url, che

refactor test_artifacts URL fixtures