Commits

Jan-Jaap Driessen committed 9a623c0

fix tests

  • Participants
  • Parent commits 4570d6e
  • Branches pluggable-injector

Comments (0)

Files changed (1)

tests/test_compiler.py

 from fanstatic import Library, Resource, NeededResources
-from fanstatic import compat, Inclusion
+from fanstatic import compat, Inclusion, MINIFIED
 from fanstatic import set_resource_file_existence_checking as check_files
 from fanstatic.compiler import Compiler, Minifier
 from .test_checksum import _copy_testdata
     lib = Library('lib', '')
     a = Resource(lib, 'a.js', compiler='mock', minifier='mock')
 
-    needed = NeededResources(minified=True, resources=[a])
-    incl = Inclusion(needed, compile=True)
+    needed = NeededResources(resources=[a])
+    incl = Inclusion(needed, compile=True, mode=MINIFIED)
     assert len(incl.resources) == 1
     assert incl.resources[0].relpath == 'a.min.js'
     assert incl.resources[0] != a
     lib = Library('lib', '')
     a = Resource(lib, 'foo/bar/a.js', compiler='mock', minifier='mock')
 
-    needed = NeededResources(resources=[a], minified=True)
-    resources = needed.resources()
-    incl = Inclusion(needed, compile=True)
-    assert len(resources) == 1
-    assert resources[0].relpath == 'foo/bar/a.min.js'
-    assert resources[0] != a
+    needed = NeededResources(resources=[a])
+    incl = Inclusion(needed, compile=True, mode=MINIFIED)
+    assert len(incl.resources) == 1
+    assert incl.resources[0].relpath == 'foo/bar/a.min.js'
+    assert incl.resources[0] != a
 
 
 def test_nothing_given_on_resource_uses_settings_from_library(compilers):