def test_injected_injects_after_overrides(self): """ re-injecting into a file will come after all other content """ ORIGINAL_STRING = """ #testinjection injectme #testinjection #OVERRIDE overidden content #OVERRIDE non-override content """.strip() i = Injections("testinjection", override="OVERRIDE") c = i.inject_content(ORIGINAL_STRING, "injectme") assert c.find("injectme") > c.find("non-override content")
def test_override(self): """ Test the override functionality """ i = Injections("testinjection", override="OVERRIDE") c = i.inject_content(TEST_CONTENT, "injectme") assert c == TEST_OVERRIDE_CONTENT, "Override result is different from expected."