No, you can't run this test without modifications.
As mentioned in comments to previous answer, solana-program-test is not a full validator. It runs only bpf/sbf interpreter with access to accounts, created in the test.
If you want to adapt the test to devnet, you have to rewrite it with solana-client
crate and manually send all the needed instructions including program deployment, account creation, filling the accounts with necessary data, if needed. However, you can't write to accounts not owned by you and before changing the ownership runtime zeroize any data, stored in the account, so it is only possible to "prepare" account owned by "user", not the program itself.
To sum up, you'd better stick with solana-program-test
.
If you really want to run tests on devnet, you can take a look on the utility we used to prepare the environment for out program (it has quite nontrivial bootstrap process exactly because of a number of program-owned accounts, that have to be present on-chain).
Sorry in advance for the absence of comments in this crate, right now we are working on a different part of the project.